diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-05-20 01:42:08 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-05-20 01:42:08 -0400 |
commit | 1e8a52e18cfb381bc9cc1f0b720540364d2a6edd (patch) | |
tree | c10c014afe3e7cab09773b8af214a0c2e85aac2e /drivers/spi/spi-ppc4xx.c | |
parent | 71422f9e68d43f3fbc6c8939ca8d1b80aa2e4d1a (diff) |
spi: By default setup spi_masters with 1 chipselect and dynamics bus number
Trivial simplification. Instead of requiring spi master drivers to
always set the bus number (even when a dynamic number is desired),
this patch modifies spi_alloc_master() to initialize num_chipselect to
1 (because there will always be at least one CS) and bus_num to -1 for
dynamic allocation. This simplifies the code needed to be written for
drivers.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi/spi-ppc4xx.c')
-rw-r--r-- | drivers/spi/spi-ppc4xx.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c index d95d307a1100..75ac9d48ef46 100644 --- a/drivers/spi/spi-ppc4xx.c +++ b/drivers/spi/spi-ppc4xx.c | |||
@@ -466,9 +466,6 @@ static int __init spi_ppc4xx_of_probe(struct platform_device *op) | |||
466 | bbp->master->setup = spi_ppc4xx_setup; | 466 | bbp->master->setup = spi_ppc4xx_setup; |
467 | bbp->master->cleanup = spi_ppc4xx_cleanup; | 467 | bbp->master->cleanup = spi_ppc4xx_cleanup; |
468 | 468 | ||
469 | /* Allocate bus num dynamically. */ | ||
470 | bbp->master->bus_num = -1; | ||
471 | |||
472 | /* the spi->mode bits understood by this driver: */ | 469 | /* the spi->mode bits understood by this driver: */ |
473 | bbp->master->mode_bits = | 470 | bbp->master->mode_bits = |
474 | SPI_CPHA | SPI_CPOL | SPI_CS_HIGH | SPI_LSB_FIRST; | 471 | SPI_CPHA | SPI_CPOL | SPI_CS_HIGH | SPI_LSB_FIRST; |