Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Andy Shevchenko and committed by
Lee Jones
51e3b257 316b8ab3

+2 -3
+2 -3
drivers/mfd/mfd-core.c
··· 87 87 } 88 88 } 89 89 90 - ACPI_COMPANION_SET(&pdev->dev, adev ?: parent); 90 + device_set_node(&pdev->dev, acpi_fwnode_handle(adev ?: parent)); 91 91 } 92 92 #else 93 93 static inline void mfd_acpi_add_device(const struct mfd_cell *cell, ··· 131 131 of_entry->np = np; 132 132 list_add_tail(&of_entry->list, &mfd_of_node_list); 133 133 134 - pdev->dev.of_node = np; 135 - pdev->dev.fwnode = &np->fwnode; 134 + device_set_node(&pdev->dev, of_fwnode_handle(np)); 136 135 #endif 137 136 return 0; 138 137 }