Skip to contentSkip to conversation

MAX7301 GPIO: Do not force SPI speed when using OF Platform

PATCH In review Christophe Leroy 2 participants 2 messages Mar 22, 2013 – Mar 27, 2013 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

drivers/gpio/gpio-max7301.c +2 -1
diff -ur linux-3.8.4/drivers/gpio/gpio-max7301.c linux/drivers/gpio/gpio-max7301.c
@@ -56,7 +56,8 @@
 	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;