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:

committed by
Rafael J. Wysocki

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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user