Skip to content

Commit aef0f5a

Browse files
andy-shevgregkh
authored andcommitted
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>
1 parent e6b3d55 commit aef0f5a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/tty/serdev/core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
#include <linux/of_device.h>
1616
#include <linux/pm_domain.h>
1717
#include <linux/pm_runtime.h>
18+
#include <linux/property.h>
1819
#include <linux/sched.h>
1920
#include <linux/serdev.h>
2021
#include <linux/slab.h>
22+
2123
#include <linux/platform_data/x86/apple.h>
2224

2325
static bool is_registered;
@@ -510,7 +512,7 @@ struct serdev_controller *serdev_controller_alloc(struct device *parent,
510512
ctrl->dev.type = &serdev_ctrl_type;
511513
ctrl->dev.bus = &serdev_bus_type;
512514
ctrl->dev.parent = parent;
513-
ctrl->dev.of_node = parent->of_node;
515+
device_set_node(&ctrl->dev, dev_fwnode(parent));
514516
serdev_controller_set_drvdata(ctrl, &ctrl[1]);
515517

516518
dev_set_name(&ctrl->dev, "serial%d", id);

0 commit comments

Comments
 (0)