summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2013-03-22 13:10:09 +0100
committerLinus Walleij <linus.walleij@linaro.org>2013-03-27 16:05:18 +0100
commit047b93a35961f7a6561e6f5dcb040738f822b892 (patch)
tree0c70cd436868f8a4ca76926c4d570a0e56ae26c1 /drivers
parentgpio: gpio-tps65910.c: fix checkpatch error (diff)
downloadlinux-047b93a35961f7a6561e6f5dcb040738f822b892.tar.xz
linux-047b93a35961f7a6561e6f5dcb040738f822b892.zip
MAX7301 GPIO: Do not force SPI speed when using OF Platform
The bit_per_word can be set in the OF Device tree, so no need to force it as with the platform_data when using OF Platform Signed-off-by: Patrick Vasseur <patrick.vasseur@c-s.fr> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/gpio-max7301.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-max7301.c b/drivers/gpio/gpio-max7301.c
index 6e1c984a75d4..3b16ab701630 100644
--- a/drivers/gpio/gpio-max7301.c
+++ b/drivers/gpio/gpio-max7301.c
@@ -56,7 +56,8 @@ static int max7301_probe(struct spi_device *spi)
int ret;
/* bits_per_word cannot be configured in platform data */
- spi->bits_per_word = 16;
+ if (spi->dev.platform_data)
+ spi->bits_per_word = 16;
ret = spi_setup(spi);
if (ret < 0)
return ret;