Title: [8853] trunk/drivers/input/touchscreen/ad7879-spi.c: [PATCH] ad7879: fix spi word size to 16 bit
- Revision
- 8853
- Author
- hennerich
- Date
- 2010-05-26 08:15:41 -0400 (Wed, 26 May 2010)
Log Message
[PATCH] ad7879: fix spi word size to 16 bit
Modified Paths
Diff
Modified: trunk/drivers/input/touchscreen/ad7879-spi.c (8852 => 8853)
--- trunk/drivers/input/touchscreen/ad7879-spi.c 2010-05-26 11:48:36 UTC (rev 8852)
+++ trunk/drivers/input/touchscreen/ad7879-spi.c 2010-05-26 12:15:41 UTC (rev 8853)
@@ -117,6 +117,7 @@
static int __devinit ad7879_spi_probe(struct spi_device *spi)
{
+ int err;
struct ad7879_bus_data bdata = {
.client = spi,
.irq = spi->irq,
@@ -129,9 +130,11 @@
return -EINVAL;
}
- if (spi->bits_per_word != 16) {
- spi->bits_per_word = 16;
- spi_setup(spi);
+ spi->bits_per_word = 16;
+ err = spi_setup(spi);
+ if (err) {
+ dev_dbg(&spi->dev, "spi master doesn't support 16 bits/word\n");
+ return err;
}
return ad7879_probe(&spi->dev, &bdata, AD7879_DEVID, BUS_SPI);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits