diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-05-20 07:42:08 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-05-20 07:42:08 +0200 |
commit | 1e8a52e18cfb381bc9cc1f0b720540364d2a6edd (patch) | |
tree | c10c014afe3e7cab09773b8af214a0c2e85aac2e /drivers/spi/spi-mpc52xx.c | |
parent | SPI: PRIMA2: use the newest APIs of PINCTRL to fix compiling errors (diff) | |
download | linux-1e8a52e18cfb381bc9cc1f0b720540364d2a6edd.tar.xz linux-1e8a52e18cfb381bc9cc1f0b720540364d2a6edd.zip |
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-mpc52xx.c')
-rw-r--r-- | drivers/spi/spi-mpc52xx.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c index 57633d963456..cb3a3830b0a5 100644 --- a/drivers/spi/spi-mpc52xx.c +++ b/drivers/spi/spi-mpc52xx.c @@ -433,7 +433,6 @@ static int __devinit mpc52xx_spi_probe(struct platform_device *op) goto err_alloc; } - master->bus_num = -1; master->setup = mpc52xx_spi_setup; master->transfer = mpc52xx_spi_transfer; master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; @@ -479,8 +478,6 @@ static int __devinit mpc52xx_spi_probe(struct platform_device *op) gpio_direction_output(gpio_cs, 1); ms->gpio_cs[i] = gpio_cs; } - } else { - master->num_chipselect = 1; } spin_lock_init(&ms->lock); |