diff options
author | Andy Shevchenko <andy.shevchenko@gmail.com> | 2021-05-10 11:56:12 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-05-10 16:56:49 +0200 |
commit | 3cd8015040d7537a6b88e26f36768a90d9247829 (patch) | |
tree | b00fbdd2e1df8e3d32df37bee2acc9135e9b0c7c /drivers/base/property.c | |
parent | Linux 5.13-rc1 (diff) | |
download | linux-3cd8015040d7537a6b88e26f36768a90d9247829.tar.xz linux-3cd8015040d7537a6b88e26f36768a90d9247829.zip |
device property: Retrieve fwnode from of_node via accessor
OF provides a specific accessor to retrieve fwnode handle.
Use it instead of direct dereferencing.
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/property.c')
-rw-r--r-- | drivers/base/property.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c index 1421e9548857..dd98759d688b 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -21,7 +21,7 @@ struct fwnode_handle *dev_fwnode(struct device *dev) { return IS_ENABLED(CONFIG_OF) && dev->of_node ? - &dev->of_node->fwnode : dev->fwnode; + of_fwnode_handle(dev->of_node) : dev->fwnode; } EXPORT_SYMBOL_GPL(dev_fwnode); @@ -763,7 +763,7 @@ struct fwnode_handle *device_get_next_child_node(struct device *dev, struct fwnode_handle *fwnode = NULL, *next; if (dev->of_node) - fwnode = &dev->of_node->fwnode; + fwnode = of_fwnode_handle(dev->of_node); else if (adev) fwnode = acpi_fwnode_handle(adev); |