summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-05-10 17:13:31 +0300
committerGuenter Roeck <linux@roeck-us.net>2021-06-17 04:21:44 -0700
commitba9c5fc395de5bb642ed973dbf34c1d0c82d185d (patch)
tree91d2d218b8e7fc8f737620ad6dd015288f9eb824 /drivers/hwmon
parent97387c2f06bcfd79d04a848d35517b32ee6dca7c (diff)
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>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/lm70.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c
index 6b884ea00987..d2a60de5b8de 100644
--- a/drivers/hwmon/lm70.c
+++ b/drivers/hwmon/lm70.c
@@ -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 */