]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
serdev: Make use of device_set_node()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 24 Oct 2023 12:41:13 +0000 (15:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Oct 2023 11:04:11 +0000 (13:04 +0200)
Use device_set_node() instead of assigning ctrl->dev.of_node
directly because it also sets the firmware node.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231024124115.3598090-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serdev/core.c

index e7d663901c07517e70c2d0d3f6789e5dcd738912..e46448efc48d305ed6db15a8587d4dbc7715fa5c 100644 (file)
 #include <linux/of_device.h>
 #include <linux/pm_domain.h>
 #include <linux/pm_runtime.h>
+#include <linux/property.h>
 #include <linux/sched.h>
 #include <linux/serdev.h>
 #include <linux/slab.h>
+
 #include <linux/platform_data/x86/apple.h>
 
 static bool is_registered;
@@ -510,7 +512,7 @@ struct serdev_controller *serdev_controller_alloc(struct device *parent,
        ctrl->dev.type = &serdev_ctrl_type;
        ctrl->dev.bus = &serdev_bus_type;
        ctrl->dev.parent = parent;
-       ctrl->dev.of_node = parent->of_node;
+       device_set_node(&ctrl->dev, dev_fwnode(parent));
        serdev_controller_set_drvdata(ctrl, &ctrl[1]);
 
        dev_set_name(&ctrl->dev, "serial%d", id);