summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi_s3c24xx.c
diff options
context:
space:
mode:
authorBen Dooks2008-04-15 23:34:46 +0200
committerLinus Torvalds2008-04-16 04:35:41 +0200
commitd1e7780638a9192f15caf590e0081bf915fdef71 (patch)
tree82c5419927d9bfaf77aecede0054a815aea058f3 /drivers/spi/spi_s3c24xx.c
parentspi: spi_s3c24xx must initialize bus_num (diff)
downloadkernel-qcow2-linux-d1e7780638a9192f15caf590e0081bf915fdef71.tar.gz
kernel-qcow2-linux-d1e7780638a9192f15caf590e0081bf915fdef71.tar.xz
kernel-qcow2-linux-d1e7780638a9192f15caf590e0081bf915fdef71.zip
spi: spi_s3c24xx must initialize num_chipselect
The SPI core now expects num_chipselect to be set correctly as due to added checks on the chip being selected before an transfer is allowed. This patch adds a num_cs field to the platform data which needs to be set correctly before adding the SPI platform device. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/spi/spi_s3c24xx.c')
-rw-r--r--drivers/spi/spi_s3c24xx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 80719ef54365..b7476b888197 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -267,6 +267,10 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, hw);
init_completion(&hw->done);
+ /* setup the master state. */
+
+ master->num_chipselect = hw->pdata->num_cs;
+
/* setup the state for the bitbang driver */
hw->bitbang.master = hw->master;