Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: (lm70) Use SPI_MODE_X_MASK

Use SPI_MODE_X_MASK instead of open coded variant.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210510141331.56736-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Andy Shevchenko and committed by
Guenter Roeck
ba9c5fc3 97387c2f

+1 -1
+1 -1
drivers/hwmon/lm70.c
··· 161 161 162 162 163 163 /* signaling is SPI_MODE_0 */ 164 - if (spi->mode & (SPI_CPOL | SPI_CPHA)) 164 + if ((spi->mode & SPI_MODE_X_MASK) != SPI_MODE_0) 165 165 return -EINVAL; 166 166 167 167 /* NOTE: we assume 8-bit words, and convert to 16 bits manually */