forked from Minki/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>
This commit is contained in:
parent
97387c2f06
commit
ba9c5fc395
@ -161,7 +161,7 @@ static int lm70_probe(struct spi_device *spi)
|
||||
|
||||
|
||||
/* signaling is SPI_MODE_0 */
|
||||
if (spi->mode & (SPI_CPOL | SPI_CPHA))
|
||||
if ((spi->mode & SPI_MODE_X_MASK) != SPI_MODE_0)
|
||||
return -EINVAL;
|
||||
|
||||
/* NOTE: we assume 8-bit words, and convert to 16 bits manually */
|
||||
|
Loading…
Reference in New Issue
Block a user