Commit ba9c5fc3 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Guenter Roeck

hwmon: (lm70) Use SPI_MODE_X_MASK

Use SPI_MODE_X_MASK instead of open coded variant.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210510141331.56736-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 97387c2f
...@@ -161,7 +161,7 @@ static int lm70_probe(struct spi_device *spi) ...@@ -161,7 +161,7 @@ static int lm70_probe(struct spi_device *spi)
/* signaling is SPI_MODE_0 */ /* signaling is SPI_MODE_0 */
if (spi->mode & (SPI_CPOL | SPI_CPHA)) if ((spi->mode & SPI_MODE_X_MASK) != SPI_MODE_0)
return -EINVAL; return -EINVAL;
/* NOTE: we assume 8-bit words, and convert to 16 bits manually */ /* NOTE: we assume 8-bit words, and convert to 16 bits manually */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment