lkml.org 
[lkml]   [2023]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 1/1] spi: Propagate firmware node
Date
Propagate firmware node by using a specific API call, i.e. device_set_node().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/spi/spi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 798030c0c5ce..295d02e7f0a8 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -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 */
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 */
rc = spi_add_device(spi);
--
2.39.1
\
 
 \ /
  Last update: 2023-03-27 00:46    [W:0.234 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site