mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-06 20:53:54 +08:00
software node: Make argument to to_software_node const
to_software_node() does not need to modify the fwnode_handle it operates on; therefore make it const. This allows passing a const fwnode_handle to to_software_node(). Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
51c100a651
commit
56c9aa0794
@ -71,9 +71,9 @@ software_node_to_swnode(const struct software_node *node)
|
||||
return swnode;
|
||||
}
|
||||
|
||||
const struct software_node *to_software_node(struct fwnode_handle *fwnode)
|
||||
const struct software_node *to_software_node(const struct fwnode_handle *fwnode)
|
||||
{
|
||||
struct swnode *swnode = to_swnode(fwnode);
|
||||
const struct swnode *swnode = to_swnode(fwnode);
|
||||
|
||||
return swnode ? swnode->node : NULL;
|
||||
}
|
||||
|
@ -418,7 +418,8 @@ struct software_node {
|
||||
};
|
||||
|
||||
bool is_software_node(const struct fwnode_handle *fwnode);
|
||||
const struct software_node *to_software_node(struct fwnode_handle *fwnode);
|
||||
const struct software_node *
|
||||
to_software_node(const struct fwnode_handle *fwnode);
|
||||
struct fwnode_handle *software_node_fwnode(const struct software_node *node);
|
||||
|
||||
const struct software_node *
|
||||
|
Loading…
Reference in New Issue
Block a user