diff options
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spidev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index d7c6e36021e8..2abc0f5a82be 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c | |||
@@ -374,7 +374,7 @@ spidev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
374 | case SPI_IOC_WR_MODE: | 374 | case SPI_IOC_WR_MODE: |
375 | retval = __get_user(tmp, (u8 __user *)arg); | 375 | retval = __get_user(tmp, (u8 __user *)arg); |
376 | if (retval == 0) { | 376 | if (retval == 0) { |
377 | u8 save = spi->mode; | 377 | u32 save = spi->mode; |
378 | 378 | ||
379 | if (tmp & ~SPI_MODE_MASK) { | 379 | if (tmp & ~SPI_MODE_MASK) { |
380 | retval = -EINVAL; | 380 | retval = -EINVAL; |
@@ -393,7 +393,7 @@ spidev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
393 | case SPI_IOC_WR_LSB_FIRST: | 393 | case SPI_IOC_WR_LSB_FIRST: |
394 | retval = __get_user(tmp, (__u8 __user *)arg); | 394 | retval = __get_user(tmp, (__u8 __user *)arg); |
395 | if (retval == 0) { | 395 | if (retval == 0) { |
396 | u8 save = spi->mode; | 396 | u32 save = spi->mode; |
397 | 397 | ||
398 | if (tmp) | 398 | if (tmp) |
399 | spi->mode |= SPI_LSB_FIRST; | 399 | spi->mode |= SPI_LSB_FIRST; |