mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
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>
This commit is contained in:
committed by
Mark Brown
parent
f2d1a3318e
commit
3974a585be
@@ -1382,7 +1382,6 @@ static int atmel_qspi_probe(struct platform_device *pdev)
|
||||
ctrl->bus_num = -1;
|
||||
ctrl->mem_ops = &atmel_qspi_mem_ops;
|
||||
ctrl->num_chipselect = 1;
|
||||
ctrl->dev.of_node = pdev->dev.of_node;
|
||||
platform_set_drvdata(pdev, ctrl);
|
||||
|
||||
/* Map the registers */
|
||||
|
||||
@@ -67,8 +67,6 @@ static int altera_spi_probe(struct platform_device *pdev)
|
||||
host->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 16);
|
||||
}
|
||||
|
||||
host->dev.of_node = pdev->dev.of_node;
|
||||
|
||||
hw = spi_controller_get_devdata(host);
|
||||
hw->dev = &pdev->dev;
|
||||
|
||||
|
||||
@@ -358,7 +358,6 @@ static int amlogic_spifc_a1_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
|
||||
ctrl->num_chipselect = 1;
|
||||
ctrl->dev.of_node = pdev->dev.of_node;
|
||||
ctrl->bits_per_word_mask = SPI_BPW_MASK(8);
|
||||
ctrl->auto_runtime_pm = true;
|
||||
ctrl->mem_ops = &amlogic_spifc_a1_mem_ops;
|
||||
|
||||
@@ -781,7 +781,6 @@ static int aml_spisg_probe(struct platform_device *pdev)
|
||||
pm_runtime_resume_and_get(&spisg->pdev->dev);
|
||||
|
||||
ctlr->num_chipselect = 4;
|
||||
ctlr->dev.of_node = pdev->dev.of_node;
|
||||
ctlr->mode_bits = SPI_CPHA | SPI_CPOL | SPI_LSB_FIRST |
|
||||
SPI_3WIRE | SPI_TX_QUAD | SPI_RX_QUAD;
|
||||
ctlr->max_speed_hz = 1000 * 1000 * 100;
|
||||
|
||||
@@ -485,7 +485,6 @@ static int apple_spi_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return dev_err_probe(&pdev->dev, ret, "Unable to bind to interrupt\n");
|
||||
|
||||
ctlr->dev.of_node = pdev->dev.of_node;
|
||||
ctlr->bus_num = pdev->id;
|
||||
ctlr->num_chipselect = 1;
|
||||
ctlr->mode_bits = SPI_CPHA | SPI_CPOL | SPI_LSB_FIRST;
|
||||
|
||||
@@ -195,7 +195,6 @@ static int ar934x_spi_probe(struct platform_device *pdev)
|
||||
ctlr->transfer_one_message = ar934x_spi_transfer_one_message;
|
||||
ctlr->bits_per_word_mask = SPI_BPW_MASK(32) | SPI_BPW_MASK(24) |
|
||||
SPI_BPW_MASK(16) | SPI_BPW_MASK(8);
|
||||
ctlr->dev.of_node = pdev->dev.of_node;
|
||||
ctlr->num_chipselect = 3;
|
||||
|
||||
dev_set_drvdata(&pdev->dev, ctlr);
|
||||
|
||||
@@ -813,7 +813,6 @@ MODULE_DEVICE_TABLE(of, a3700_spi_dt_ids);
|
||||
static int a3700_spi_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *of_node = dev->of_node;
|
||||
struct spi_controller *host;
|
||||
struct a3700_spi *spi;
|
||||
u32 num_cs = 0;
|
||||
@@ -826,14 +825,13 @@ static int a3700_spi_probe(struct platform_device *pdev)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (of_property_read_u32(of_node, "num-cs", &num_cs)) {
|
||||
if (of_property_read_u32(dev->of_node, "num-cs", &num_cs)) {
|
||||
dev_err(dev, "could not find num-cs\n");
|
||||
ret = -ENXIO;
|
||||
goto error;
|
||||
}
|
||||
|
||||
host->bus_num = pdev->id;
|
||||
host->dev.of_node = of_node;
|
||||
host->mode_bits = SPI_MODE_3;
|
||||
host->num_chipselect = num_cs;
|
||||
host->bits_per_word_mask = SPI_BPW_MASK(8) | SPI_BPW_MASK(32);
|
||||
|
||||
@@ -898,7 +898,6 @@ static int aspeed_spi_probe(struct platform_device *pdev)
|
||||
ctlr->setup = aspeed_spi_setup;
|
||||
ctlr->cleanup = aspeed_spi_cleanup;
|
||||
ctlr->num_chipselect = of_get_available_child_count(dev->of_node);
|
||||
ctlr->dev.of_node = dev->of_node;
|
||||
|
||||
aspi->num_cs = ctlr->num_chipselect;
|
||||
|
||||
|
||||
@@ -552,7 +552,6 @@ static void atcspi_init_controller(struct platform_device *pdev,
|
||||
/* Initialize controller properties */
|
||||
host->bus_num = pdev->id;
|
||||
host->mode_bits = SPI_CPOL | SPI_CPHA | SPI_RX_QUAD | SPI_TX_QUAD;
|
||||
host->dev.of_node = pdev->dev.of_node;
|
||||
host->num_chipselect = ATCSPI_MAX_CS_NUM;
|
||||
host->mem_ops = &atcspi_mem_ops;
|
||||
host->max_speed_hz = spi->sclk_rate;
|
||||
|
||||
@@ -180,7 +180,6 @@ static int ath79_spi_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
sp = spi_controller_get_devdata(host);
|
||||
host->dev.of_node = pdev->dev.of_node;
|
||||
platform_set_drvdata(pdev, sp);
|
||||
|
||||
host->use_gpio_descriptors = true;
|
||||
|
||||
@@ -1536,7 +1536,6 @@ static int atmel_spi_probe(struct platform_device *pdev)
|
||||
host->use_gpio_descriptors = true;
|
||||
host->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
|
||||
host->bits_per_word_mask = SPI_BPW_RANGE_MASK(8, 16);
|
||||
host->dev.of_node = pdev->dev.of_node;
|
||||
host->bus_num = pdev->id;
|
||||
host->num_chipselect = 4;
|
||||
host->setup = atmel_spi_setup;
|
||||
|
||||
@@ -1080,7 +1080,6 @@ static int spi_engine_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
host->dev.of_node = pdev->dev.of_node;
|
||||
host->mode_bits = SPI_CPOL | SPI_CPHA | SPI_3WIRE;
|
||||
host->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32);
|
||||
host->max_speed_hz = clk_get_rate(spi_engine->ref_clk) / 2;
|
||||
|
||||
@@ -1529,7 +1529,6 @@ int bcm_qspi_probe(struct platform_device *pdev,
|
||||
host->transfer_one = bcm_qspi_transfer_one;
|
||||
host->mem_ops = &bcm_qspi_mem_ops;
|
||||
host->cleanup = bcm_qspi_cleanup;
|
||||
host->dev.of_node = dev->of_node;
|
||||
host->num_chipselect = NUM_CHIPSELECT;
|
||||
host->use_gpio_descriptors = true;
|
||||
|
||||
|
||||
@@ -1368,7 +1368,6 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
|
||||
ctlr->transfer_one = bcm2835_spi_transfer_one;
|
||||
ctlr->handle_err = bcm2835_spi_handle_err;
|
||||
ctlr->prepare_message = bcm2835_spi_prepare_message;
|
||||
ctlr->dev.of_node = pdev->dev.of_node;
|
||||
|
||||
bs = spi_controller_get_devdata(ctlr);
|
||||
bs->ctlr = ctlr;
|
||||
|
||||
@@ -502,7 +502,6 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev)
|
||||
host->handle_err = bcm2835aux_spi_handle_err;
|
||||
host->prepare_message = bcm2835aux_spi_prepare_message;
|
||||
host->unprepare_message = bcm2835aux_spi_unprepare_message;
|
||||
host->dev.of_node = pdev->dev.of_node;
|
||||
host->use_gpio_descriptors = true;
|
||||
|
||||
bs = spi_controller_get_devdata(host);
|
||||
|
||||
@@ -822,7 +822,6 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev)
|
||||
init_completion(&bs->done);
|
||||
|
||||
host->mem_ops = &bcm63xx_hsspi_mem_ops;
|
||||
host->dev.of_node = dev->of_node;
|
||||
if (!dev->of_node)
|
||||
host->bus_num = HSSPI_BUS_NUM;
|
||||
|
||||
|
||||
@@ -571,7 +571,6 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
host->dev.of_node = dev->of_node;
|
||||
host->bus_num = bus_num;
|
||||
host->num_chipselect = num_cs;
|
||||
host->transfer_one_message = bcm63xx_spi_transfer_one;
|
||||
|
||||
@@ -500,7 +500,6 @@ static int bcmbca_hsspi_probe(struct platform_device *pdev)
|
||||
mutex_init(&bs->msg_mutex);
|
||||
init_completion(&bs->done);
|
||||
|
||||
host->dev.of_node = dev->of_node;
|
||||
if (!dev->of_node)
|
||||
host->bus_num = HSSPI_BUS_NUM;
|
||||
|
||||
|
||||
@@ -1827,7 +1827,6 @@ static int cqspi_probe(struct platform_device *pdev)
|
||||
host->mode_bits = SPI_RX_QUAD | SPI_RX_DUAL;
|
||||
host->mem_ops = &cqspi_mem_ops;
|
||||
host->mem_caps = &cqspi_mem_caps;
|
||||
host->dev.of_node = pdev->dev.of_node;
|
||||
|
||||
cqspi = spi_controller_get_devdata(host);
|
||||
|
||||
|
||||
@@ -1157,7 +1157,6 @@ static int cdns_xspi_probe(struct platform_device *pdev)
|
||||
cdns_xspi->sdma_handler = &cdns_xspi_sdma_handle;
|
||||
cdns_xspi->set_interrupts_handler = &cdns_xspi_set_interrupts;
|
||||
}
|
||||
host->dev.of_node = pdev->dev.of_node;
|
||||
host->bus_num = -1;
|
||||
|
||||
platform_set_drvdata(pdev, host);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user