From 1e8a52e18cfb381bc9cc1f0b720540364d2a6edd Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Sat, 19 May 2012 23:42:08 -0600 Subject: 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 --- drivers/spi/spi-ath79.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/spi/spi-ath79.c') diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c index acc88b4d2869..249077e5cc48 100644 --- a/drivers/spi/spi-ath79.c +++ b/drivers/spi/spi-ath79.c @@ -216,9 +216,6 @@ static __devinit int ath79_spi_probe(struct platform_device *pdev) if (pdata) { master->bus_num = pdata->bus_num; master->num_chipselect = pdata->num_chipselect; - } else { - master->bus_num = -1; - master->num_chipselect = 1; } sp->bitbang.master = spi_master_get(master); -- cgit v1.2.1