Linux SPI subsystem development
 help / color / mirror / Atom feed
* [PATCH] spi: realtek-rtl-snand: assign of_node instead of device
@ 2025-12-17  6:26 Rosen Penev
  2025-12-17 10:34 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2025-12-17  6:26 UTC (permalink / raw)
  To: linux-spi; +Cc: Chris Packham, Mark Brown, open list

This driver is OF only. No need for device_set_node.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/spi/spi-realtek-rtl-snand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-realtek-rtl-snand.c b/drivers/spi/spi-realtek-rtl-snand.c
index 741cf2af3e91..6b857742b301 100644
--- a/drivers/spi/spi-realtek-rtl-snand.c
+++ b/drivers/spi/spi-realtek-rtl-snand.c
@@ -400,7 +400,7 @@ static int rtl_snand_probe(struct platform_device *pdev)
 	ctrl->mem_ops = &rtl_snand_mem_ops;
 	ctrl->bits_per_word_mask = SPI_BPW_MASK(8);
 	ctrl->mode_bits = SPI_RX_DUAL | SPI_RX_QUAD | SPI_TX_DUAL | SPI_TX_QUAD;
-	device_set_node(&ctrl->dev, dev_fwnode(dev));
+	ctrl->dev.of_node = dev->of_node;
 
 	return devm_spi_register_controller(dev, ctrl);
 }
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: realtek-rtl-snand: assign of_node instead of device
  2025-12-17  6:26 [PATCH] spi: realtek-rtl-snand: assign of_node instead of device Rosen Penev
@ 2025-12-17 10:34 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2025-12-17 10:34 UTC (permalink / raw)
  To: Rosen Penev; +Cc: linux-spi, Chris Packham, open list

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

On Tue, Dec 16, 2025 at 10:26:35PM -0800, Rosen Penev wrote:
> This driver is OF only. No need for device_set_node.
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>

What's the benefit here?  This creates a barrier to adding support for
other interfaces and I can't identify a problem it solves.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-17 10:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-17  6:26 [PATCH] spi: realtek-rtl-snand: assign of_node instead of device Rosen Penev
2025-12-17 10:34 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox