diff --git a/drivers/base/property.c b/drivers/base/property.c index 1421e9548857b34ee9f185e29875b22ab18abc7f..dd98759d688bf9fb5f7cd880bf3caab1b792455a 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);