summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-max7301.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-max7301.c')
-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;
OpenPOWER on IntegriCloud