Commit 51e3b257 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Lee Jones

mfd: core: Make use of device_set_node()

Use device_set_node() instead of assigning pdev->dev.of_node
directly because it also sets the firmware node.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarHerve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20240530115147.1112498-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 316b8ab3
......@@ -87,7 +87,7 @@ static void mfd_acpi_add_device(const struct mfd_cell *cell,
}
}
ACPI_COMPANION_SET(&pdev->dev, adev ?: parent);
device_set_node(&pdev->dev, acpi_fwnode_handle(adev ?: parent));
}
#else
static inline void mfd_acpi_add_device(const struct mfd_cell *cell,
......@@ -131,8 +131,7 @@ static int mfd_match_of_node_to_dev(struct platform_device *pdev,
of_entry->np = np;
list_add_tail(&of_entry->list, &mfd_of_node_list);
pdev->dev.of_node = np;
pdev->dev.fwnode = &np->fwnode;
device_set_node(&pdev->dev, of_fwnode_handle(np));
#endif
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment