Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: ad7879 - fix spi word size to 16 bit

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

authored by

Michael Hennerich and committed by
Dmitry Torokhov
447b9065 16ea10a7

+8
+8
drivers/input/touchscreen/ad7879-spi.c
··· 134 134 static int __devinit ad7879_spi_probe(struct spi_device *spi) 135 135 { 136 136 struct ad7879 *ts; 137 + int err; 137 138 138 139 /* don't exceed max specified SPI CLK frequency */ 139 140 if (spi->max_speed_hz > MAX_SPI_FREQ_HZ) { 140 141 dev_err(&spi->dev, "SPI CLK %d Hz?\n", spi->max_speed_hz); 141 142 return -EINVAL; 143 + } 144 + 145 + spi->bits_per_word = 16; 146 + err = spi_setup(spi); 147 + if (err) { 148 + dev_dbg(&spi->dev, "spi master doesn't support 16 bits/word\n"); 149 + return err; 142 150 } 143 151 144 152 ts = ad7879_probe(&spi->dev, AD7879_DEVID, spi->irq, &ad7879_spi_bus_ops);