Skip to content

Commit 51e3b25

Browse files
andy-shevlag-linaro
authored andcommitted
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]>
1 parent 316b8ab commit 51e3b25

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/mfd/mfd-core.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static void mfd_acpi_add_device(const struct mfd_cell *cell,
8787
}
8888
}
8989

90-
ACPI_COMPANION_SET(&pdev->dev, adev ?: parent);
90+
device_set_node(&pdev->dev, acpi_fwnode_handle(adev ?: parent));
9191
}
9292
#else
9393
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,
131131
of_entry->np = np;
132132
list_add_tail(&of_entry->list, &mfd_of_node_list);
133133

134-
pdev->dev.of_node = np;
135-
pdev->dev.fwnode = &np->fwnode;
134+
device_set_node(&pdev->dev, of_fwnode_handle(np));
136135
#endif
137136
return 0;
138137
}

0 commit comments

Comments
 (0)