Skip to content

Commit

Permalink
MAX7301 GPIO: Do not force SPI speed when using OF Platform
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christophe Leroy authored and Linus Walleij committed Mar 27, 2013
1 parent 195c65e commit 047b93a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpio/gpio-max7301.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 047b93a

Please sign in to comment.