mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-01 06:46:35 +01:00
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 <[email protected]> Reviewed-by: Herve Codina <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
This commit is contained in:
1 parent
316b8ab386
commit
51e3b25709
1 file changed
+2
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user