Commit 37fbc1ab authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mark Brown
Browse files

spi: Drop duplicate device_set_node() call



The SPI core provides the default fwnode for the controller,
assigned by device_set_node(). No need to repeat it in the driver.

Tested-by: Benoît Monin <benoit.monin@bootlin.com> # dw mobileye
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> # renesas
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260112203534.4186261-5-andriy.shevchenko@linux.intel.com


Reviewed-by: default avatarLinus Walleij <linusw@kernel.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 103c510e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1124,7 +1124,6 @@ static int airoha_snand_probe(struct platform_device *pdev)
	ctrl->bits_per_word_mask = SPI_BPW_MASK(8);
	ctrl->mode_bits = SPI_RX_DUAL;
	ctrl->setup = airoha_snand_setup;
	device_set_node(&ctrl->dev, dev_fwnode(dev));

	err = airoha_snand_nfi_init(as_ctrl);
	if (err)
+0 −3
Original line number Diff line number Diff line
@@ -682,15 +682,12 @@ static int dln2_spi_probe(struct platform_device *pdev)
	struct spi_controller *host;
	struct dln2_spi *dln2;
	struct dln2_platform_data *pdata = dev_get_platdata(&pdev->dev);
	struct device *dev = &pdev->dev;
	int ret;

	host = spi_alloc_host(&pdev->dev, sizeof(*dln2));
	if (!host)
		return -ENOMEM;

	device_set_node(&host->dev, dev_fwnode(dev));

	platform_set_drvdata(pdev, host);

	dln2 = spi_controller_get_devdata(host);
+0 −2
Original line number Diff line number Diff line
@@ -936,8 +936,6 @@ int dw_spi_add_controller(struct device *dev, struct dw_spi *dws)
	if (!ctlr)
		return -ENOMEM;

	device_set_node(&ctlr->dev, dev_fwnode(dev));

	dws->ctlr = ctlr;
	dws->dma_addr = (dma_addr_t)(dws->paddr + DW_SPI_DR);

+0 −1
Original line number Diff line number Diff line
@@ -689,7 +689,6 @@ static int ep93xx_spi_probe(struct platform_device *pdev)
	/* make sure that the hardware is disabled */
	writel(0, espi->mmio + SSPCR1);

	device_set_node(&host->dev, dev_fwnode(&pdev->dev));
	error = devm_spi_register_controller(&pdev->dev, host);
	if (error) {
		dev_err(&pdev->dev, "failed to register SPI host\n");
+0 −1
Original line number Diff line number Diff line
@@ -351,7 +351,6 @@ static int spi_gpio_probe(struct platform_device *pdev)
		return -ENOMEM;

	if (fwnode) {
		device_set_node(&host->dev, fwnode);
		host->use_gpio_descriptors = true;
	} else {
		status = spi_gpio_probe_pdata(pdev, host);
Loading