summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2017-03-28 10:52:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-11 08:49:29 -0700
commit1f32e67adac40508e9c8753151effbe0bbf06bdb (patch)
tree924f66fd9d93725e8964fdd1410fd9113ac5dca5 /drivers/base
parent347be00b56f72a5a6759930dc7269cb3b1fbbad6 (diff)
device property: Make dev_fwnode() public
commit e44bb0cbdc88686c21e2175a990b40bf6db5d005 upstream. The function to obtain a fwnode related to a struct device is useful for drivers that use the fwnode property API: it allows not being aware of the underlying firmware implementation. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: Chris Metcalf <cmetcalf@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/property.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c
index 43a36d68c3fd..06f66687fe0b 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -182,11 +182,12 @@ static int pset_prop_read_string(struct property_set *pset,
return 0;
}
-static inline struct fwnode_handle *dev_fwnode(struct device *dev)
+struct fwnode_handle *dev_fwnode(struct device *dev)
{
return IS_ENABLED(CONFIG_OF) && dev->of_node ?
&dev->of_node->fwnode : dev->fwnode;
}
+EXPORT_SYMBOL_GPL(dev_fwnode);
/**
* device_property_present - check if a property of a device is present