Skip to content

Commit 3974a58

Browse files
andy-shevbroonie
authored andcommitted
spi: Drop duplicate of_node assignment
The SPI core provides the default of_node for the controller, inherited from the actual (parent) device. No need to repeat it in the driver. Acked-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: William Zhang <william.zhang@broadcom.com> Acked-by: Chen-Yu Tsai <wens@kernel.org> # sun4i, sun6i Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> # renesas Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260112203534.4186261-3-andriy.shevchenko@linux.intel.com Tested-by: Prajna Rajendra Kumar <prajna.rajendrakumar@microchip.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent f2d1a33 commit 3974a58

87 files changed

Lines changed: 1 addition & 90 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/spi/atmel-quadspi.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,6 @@ static int atmel_qspi_probe(struct platform_device *pdev)
13821382
ctrl->bus_num = -1;
13831383
ctrl->mem_ops = &atmel_qspi_mem_ops;
13841384
ctrl->num_chipselect = 1;
1385-
ctrl->dev.of_node = pdev->dev.of_node;
13861385
platform_set_drvdata(pdev, ctrl);
13871386

13881387
/* Map the registers */

drivers/spi/spi-altera-platform.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ static int altera_spi_probe(struct platform_device *pdev)
6767
host->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 16);
6868
}
6969

70-
host->dev.of_node = pdev->dev.of_node;
71-
7270
hw = spi_controller_get_devdata(host);
7371
hw->dev = &pdev->dev;
7472

drivers/spi/spi-amlogic-spifc-a1.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ static int amlogic_spifc_a1_probe(struct platform_device *pdev)
358358
return ret;
359359

360360
ctrl->num_chipselect = 1;
361-
ctrl->dev.of_node = pdev->dev.of_node;
362361
ctrl->bits_per_word_mask = SPI_BPW_MASK(8);
363362
ctrl->auto_runtime_pm = true;
364363
ctrl->mem_ops = &amlogic_spifc_a1_mem_ops;

drivers/spi/spi-amlogic-spisg.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,6 @@ static int aml_spisg_probe(struct platform_device *pdev)
781781
pm_runtime_resume_and_get(&spisg->pdev->dev);
782782

783783
ctlr->num_chipselect = 4;
784-
ctlr->dev.of_node = pdev->dev.of_node;
785784
ctlr->mode_bits = SPI_CPHA | SPI_CPOL | SPI_LSB_FIRST |
786785
SPI_3WIRE | SPI_TX_QUAD | SPI_RX_QUAD;
787786
ctlr->max_speed_hz = 1000 * 1000 * 100;

drivers/spi/spi-apple.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,6 @@ static int apple_spi_probe(struct platform_device *pdev)
485485
if (ret)
486486
return dev_err_probe(&pdev->dev, ret, "Unable to bind to interrupt\n");
487487

488-
ctlr->dev.of_node = pdev->dev.of_node;
489488
ctlr->bus_num = pdev->id;
490489
ctlr->num_chipselect = 1;
491490
ctlr->mode_bits = SPI_CPHA | SPI_CPOL | SPI_LSB_FIRST;

drivers/spi/spi-ar934x.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ static int ar934x_spi_probe(struct platform_device *pdev)
195195
ctlr->transfer_one_message = ar934x_spi_transfer_one_message;
196196
ctlr->bits_per_word_mask = SPI_BPW_MASK(32) | SPI_BPW_MASK(24) |
197197
SPI_BPW_MASK(16) | SPI_BPW_MASK(8);
198-
ctlr->dev.of_node = pdev->dev.of_node;
199198
ctlr->num_chipselect = 3;
200199

201200
dev_set_drvdata(&pdev->dev, ctlr);

drivers/spi/spi-armada-3700.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,6 @@ MODULE_DEVICE_TABLE(of, a3700_spi_dt_ids);
813813
static int a3700_spi_probe(struct platform_device *pdev)
814814
{
815815
struct device *dev = &pdev->dev;
816-
struct device_node *of_node = dev->of_node;
817816
struct spi_controller *host;
818817
struct a3700_spi *spi;
819818
u32 num_cs = 0;
@@ -826,14 +825,13 @@ static int a3700_spi_probe(struct platform_device *pdev)
826825
goto out;
827826
}
828827

829-
if (of_property_read_u32(of_node, "num-cs", &num_cs)) {
828+
if (of_property_read_u32(dev->of_node, "num-cs", &num_cs)) {
830829
dev_err(dev, "could not find num-cs\n");
831830
ret = -ENXIO;
832831
goto error;
833832
}
834833

835834
host->bus_num = pdev->id;
836-
host->dev.of_node = of_node;
837835
host->mode_bits = SPI_MODE_3;
838836
host->num_chipselect = num_cs;
839837
host->bits_per_word_mask = SPI_BPW_MASK(8) | SPI_BPW_MASK(32);

drivers/spi/spi-aspeed-smc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,6 @@ static int aspeed_spi_probe(struct platform_device *pdev)
898898
ctlr->setup = aspeed_spi_setup;
899899
ctlr->cleanup = aspeed_spi_cleanup;
900900
ctlr->num_chipselect = of_get_available_child_count(dev->of_node);
901-
ctlr->dev.of_node = dev->of_node;
902901

903902
aspi->num_cs = ctlr->num_chipselect;
904903

drivers/spi/spi-atcspi200.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,6 @@ static void atcspi_init_controller(struct platform_device *pdev,
552552
/* Initialize controller properties */
553553
host->bus_num = pdev->id;
554554
host->mode_bits = SPI_CPOL | SPI_CPHA | SPI_RX_QUAD | SPI_TX_QUAD;
555-
host->dev.of_node = pdev->dev.of_node;
556555
host->num_chipselect = ATCSPI_MAX_CS_NUM;
557556
host->mem_ops = &atcspi_mem_ops;
558557
host->max_speed_hz = spi->sclk_rate;

drivers/spi/spi-ath79.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ static int ath79_spi_probe(struct platform_device *pdev)
180180
}
181181

182182
sp = spi_controller_get_devdata(host);
183-
host->dev.of_node = pdev->dev.of_node;
184183
platform_set_drvdata(pdev, sp);
185184

186185
host->use_gpio_descriptors = true;

0 commit comments

Comments
 (0)