Skip to content

Commit d560040

Browse files
mripardbroonie
authored andcommitted
spi: spi-gpio: fix compilation warning on 64 bits systems
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 <maxime.ripard@free-electrons.com> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1 parent 5cbc7ca commit d560040

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎include/linux/spi/spi_gpio.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
*/
6363
struct spi_gpio_platform_data {
6464
unsigned sck;
65-
unsigned mosi;
66-
unsigned miso;
65+
unsigned long mosi;
66+
unsigned long miso;
6767

6868
u16 num_chipselect;
6969
};

0 commit comments

Comments
 (0)