spi: Propagate firmware node

Propagate firmware node by using a specific API call, i.e. device_set_node().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230306182913.87231-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Andy Shevchenko 2023-03-06 20:29:13 +02:00 committed by Mark Brown
parent b36cecf247
commit c7cc588bf0
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -2368,8 +2368,8 @@ of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc)
/* Store a pointer to the node in the device structure */ /* Store a pointer to the node in the device structure */
of_node_get(nc); of_node_get(nc);
spi->dev.of_node = nc;
spi->dev.fwnode = of_fwnode_handle(nc); device_set_node(&spi->dev, of_fwnode_handle(nc));
/* Register the new device */ /* Register the new device */
rc = spi_add_device(spi); rc = spi_add_device(spi);