spi: Remove explictly set bus_num and num_chipselect to default setting
authorAxel Lin <axel.lin@ingics.com>
Tue, 11 Feb 2014 14:10:19 +0000 (22:10 +0800)
committerMark Brown <broonie@linaro.org>
Sun, 16 Feb 2014 01:51:02 +0000 (09:51 +0800)
The purpose of commit 1e8a52e18cfb
"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>
drivers/spi/spi-bcm2835.c
drivers/spi/spi-efm32.c
drivers/spi/spi-falcon.c
drivers/spi/spi-octeon.c
drivers/spi/spi-sh-hspi.c
drivers/spi/spi-tegra114.c
drivers/spi/spi-tegra20-sflash.c
drivers/spi/spi-tegra20-slink.c
drivers/spi/spi-ti-qspi.c

index 8a89dd1..6916745 100644 (file)
@@ -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;
index d4d3cc5..7199d2f 100644 (file)
@@ -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;
 }
 
index dd5bd46..ccd257b 100644 (file)
@@ -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;
index 67249a4..e31f6d8 100644 (file)
@@ -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 |
index 82d2f92..755d7cc 100644 (file)
@@ -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;
index 413c718..1e399ad 100644 (file)
@@ -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;
index 0879497..44e00db 100644 (file)
@@ -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);
index be3a069..b06ea31 100644 (file)
@@ -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);
index 3d09265..de9920e 100644 (file)
@@ -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;