device property: Fix recent breakage of fwnode_get_next_parent_dev()
authorDouglas Anderson <dianders@chromium.org>
Fri, 29 Apr 2022 23:43:47 +0000 (16:43 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 5 May 2022 12:19:15 +0000 (14:19 +0200)
Due to a subtle typo, instead of commit 87ffea09470d ("device
property: Introduce fwnode_for_each_parent_node()") being a no-op
change, it ended up causing the display on my sc7180-trogdor-lazor
device from coming up unless I added "fw_devlink=off" to my kernel
command line. Fix the typo.

Fixes: 87ffea09470d ("device property: Introduce fwnode_for_each_parent_node()")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Saravana Kannan <saravanak@google.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/property.c

index 36401cfe432c3dda28430116430d340434fdb096..52e85dcb20b58a5d9a751710d14621c6362b476c 100644 (file)
@@ -600,7 +600,7 @@ struct device *fwnode_get_next_parent_dev(struct fwnode_handle *fwnode)
        struct device *dev;
 
        fwnode_for_each_parent_node(fwnode, parent) {
-               dev = get_dev_from_fwnode(fwnode);
+               dev = get_dev_from_fwnode(parent);
                if (dev) {
                        fwnode_handle_put(parent);
                        return dev;