diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2017-03-28 10:52:24 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-03-29 00:00:28 +0200 |
commit | e44bb0cbdc88686c21e2175a990b40bf6db5d005 (patch) | |
tree | 83345265d5cf803d52726e612be2f99b04098210 /drivers/base | |
parent | 67831837e0b192fe0b8ee8b5e502d95ad2c497c0 (diff) | |
download | linux-e44bb0cbdc88686c21e2175a990b40bf6db5d005.tar.gz linux-e44bb0cbdc88686c21e2175a990b40bf6db5d005.tar.bz2 linux-e44bb0cbdc88686c21e2175a990b40bf6db5d005.zip |
device property: Make dev_fwnode() public
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>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/property.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c index 23514bf67933..22849a89a8b5 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -183,11 +183,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 |