summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2019-10-03 14:32:09 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-10-11 11:26:55 +0200
commit56c9aa07942434490890ac35bba99026e66cb949 (patch)
treee4bcb8b5a1519354b66719e4bfe5e491763907c0 /drivers/base
parentsoftware node: Get reference to parent swnode in get_parent op (diff)
downloadlinux-56c9aa07942434490890ac35bba99026e66cb949.tar.xz
linux-56c9aa07942434490890ac35bba99026e66cb949.zip
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>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/swnode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
index d5b4905e2adb..9cde143201f5 100644
--- a/drivers/base/swnode.c
+++ b/drivers/base/swnode.c
@@ -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;
}