Skip to content

Commit

Permalink
spi: Remove explictly set bus_num and num_chipselect to default setting
Browse files Browse the repository at this point in the history
The purpose of commit 1e8a52e
"spi: By default setup spi_masters with 1 chipselect and dynamics bus number"
is to avoid setting default value for bus_num and num_chipselect in spi master
drivers. So let's remove the duplicate code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-By: David Daney <david.daney@cavium.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Axel Lin authored and Mark Brown committed Feb 16, 2014
1 parent 38dbfb5 commit 78e3952
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 14 deletions.
1 change: 0 additions & 1 deletion drivers/spi/spi-bcm2835.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ static int bcm2835_spi_probe(struct platform_device *pdev)

master->mode_bits = BCM2835_SPI_MODE_BITS;
master->bits_per_word_mask = SPI_BPW_MASK(8);
master->bus_num = -1;
master->num_chipselect = 3;
master->transfer_one_message = bcm2835_spi_transfer_one;
master->dev.of_node = pdev->dev.of_node;
Expand Down
4 changes: 0 additions & 4 deletions drivers/spi/spi-efm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,6 @@ static int efm32_spi_probe_dt(struct platform_device *pdev,
}

ddata->pdata.location = location;

/* spi core takes care about the bus number using an alias */
master->bus_num = -1;

return 0;
}

Expand Down
2 changes: 0 additions & 2 deletions drivers/spi/spi-falcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,7 @@ static int falcon_sflash_probe(struct platform_device *pdev)
priv->master = master;

master->mode_bits = SPI_MODE_3;
master->num_chipselect = 1;
master->flags = SPI_MASTER_HALF_DUPLEX;
master->bus_num = -1;
master->setup = falcon_sflash_setup;
master->prepare_transfer_hardware = falcon_sflash_prepare_xfer;
master->transfer_one_message = falcon_sflash_xfer_one;
Expand Down
2 changes: 0 additions & 2 deletions drivers/spi/spi-octeon.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ static int octeon_spi_probe(struct platform_device *pdev)
p->register_base = (u64)devm_ioremap(&pdev->dev, res_mem->start,
resource_size(res_mem));

/* Dynamic bus numbering */
master->bus_num = -1;
master->num_chipselect = 4;
master->mode_bits = SPI_CPHA |
SPI_CPOL |
Expand Down
1 change: 0 additions & 1 deletion drivers/spi/spi-sh-hspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ static int hspi_probe(struct platform_device *pdev)

pm_runtime_enable(&pdev->dev);

master->num_chipselect = 1;
master->bus_num = pdev->id;
master->setup = hspi_setup;
master->cleanup = hspi_cleanup;
Expand Down
1 change: 0 additions & 1 deletion drivers/spi/spi-tegra114.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,6 @@ static int tegra_spi_probe(struct platform_device *pdev)
master->setup = tegra_spi_setup;
master->transfer_one_message = tegra_spi_transfer_one_message;
master->num_chipselect = MAX_CHIP_SELECT;
master->bus_num = -1;
master->auto_runtime_pm = true;

tspi->master = master;
Expand Down
1 change: 0 additions & 1 deletion drivers/spi/spi-tegra20-sflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ static int tegra_sflash_probe(struct platform_device *pdev)
master->transfer_one_message = tegra_sflash_transfer_one_message;
master->auto_runtime_pm = true;
master->num_chipselect = MAX_CHIP_SELECT;
master->bus_num = -1;

platform_set_drvdata(pdev, master);
tsd = spi_master_get_devdata(master);
Expand Down
1 change: 0 additions & 1 deletion drivers/spi/spi-tegra20-slink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,6 @@ static int tegra_slink_probe(struct platform_device *pdev)
master->unprepare_message = tegra_slink_unprepare_message;
master->auto_runtime_pm = true;
master->num_chipselect = MAX_CHIP_SELECT;
master->bus_num = -1;

platform_set_drvdata(pdev, master);
tspi = spi_master_get_devdata(master);
Expand Down
1 change: 0 additions & 1 deletion drivers/spi/spi-ti-qspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ static int ti_qspi_probe(struct platform_device *pdev)

master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_RX_DUAL | SPI_RX_QUAD;

master->bus_num = -1;
master->flags = SPI_MASTER_HALF_DUPLEX;
master->setup = ti_qspi_setup;
master->auto_runtime_pm = true;
Expand Down

0 comments on commit 78e3952

Please sign in to comment.