diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-10-24 15:41:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-27 13:04:11 +0200 |
commit | aef0f5a1841e76fe13621edc7123076b38d458b0 (patch) | |
tree | 37144698edd4c93d2c7d62c2451c4008e5a0ceb9 /drivers/tty | |
parent | e6b3d55b67d00c084a2b98c594330411fb4ebeac (diff) | |
download | linux-stable-aef0f5a1841e76fe13621edc7123076b38d458b0.tar.gz linux-stable-aef0f5a1841e76fe13621edc7123076b38d458b0.tar.bz2 linux-stable-aef0f5a1841e76fe13621edc7123076b38d458b0.zip |
serdev: Make use of device_set_node()
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serdev/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c index e7d663901c07..e46448efc48d 100644 --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c @@ -15,9 +15,11 @@ #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); |