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 <[email protected]>
Signed-off-by: David Brownell <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Ben Dooks 2008-04-15 14:34:46 -07:00 • committed by Linus Torvalds
commit d1e7780638
2 changed files with 5 additions and 0 deletions

View file

@ -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;