Skip to content

Commit

Permalink
spi: spi-gpio: fix compilation warning on 64 bits systems
Browse files Browse the repository at this point in the history
SPI_GPIO_NO_MOSI and SPI_GPIO_NO_MISO flags are type casted to unsigned
long, yet, they are to be stored in an unsigned int field in the
spi_gpio_platform_data structure.

This leads to the following warning during compilation on 64 bits systems:
warning: large integer implicitly truncated to unsigned type [-Woverflow]

Signed-off-by: Maxime Ripard <[email protected]>
Reported-by: Fengguang Wu <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
mripard authored and broonie committed Jan 31, 2013
1 parent 5cbc7ca commit d560040
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/spi/spi_gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
*/
struct spi_gpio_platform_data {
unsigned sck;
unsigned mosi;
unsigned miso;
unsigned long mosi;
unsigned long miso;

u16 num_chipselect;
};
Expand Down

0 comments on commit d560040

Please sign in to comment.