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:
Sakari Ailus 2019-10-03 15:32:09 +03:00 committed by Rafael J. Wysocki
parent 51c100a651
commit 56c9aa0794
2 changed files with 4 additions and 3 deletions

View File

@ -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;
}

View File

@ -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 *