diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-05-30 13:51:47 +0200 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2024-07-04 18:08:03 +0200 |
commit | 51e3b257099d10a87de58f1d40fe0b9641bd1f0e (patch) | |
tree | 6d667dfac95d1667ec96ef314991098c01f66d26 /drivers/mfd | |
parent | mfd: mt6397-core: Add support for AUXADCs on MT6357/58/59 PMICs (diff) | |
download | linux-51e3b257099d10a87de58f1d40fe0b9641bd1f0e.tar.xz linux-51e3b257099d10a87de58f1d40fe0b9641bd1f0e.zip |
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20240530115147.1112498-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/mfd-core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 6ad5c93027af..7ea9a875d8f3 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c @@ -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 @@ allocate_of_node: 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; } |