MAX7301 GPIO: Do not force SPI speed when using OF Platform
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 22 Mar 2013 12:10:09 +0000 (13:10 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 27 Mar 2013 15:05:18 +0000 (16:05 +0100)
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>
drivers/gpio/gpio-max7301.c

index 6e1c984..3b16ab7 100644 (file)
@@ -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;