summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-05-10 16:13:31 +0200
committerGuenter Roeck <linux@roeck-us.net>2021-06-17 13:21:44 +0200
commitba9c5fc395de5bb642ed973dbf34c1d0c82d185d (patch)
tree91d2d218b8e7fc8f737620ad6dd015288f9eb824 /drivers/hwmon
parenthwmon: (max31722) Remove non-standard ACPI device IDs (diff)
downloadlinux-ba9c5fc395de5bb642ed973dbf34c1d0c82d185d.tar.xz
linux-ba9c5fc395de5bb642ed973dbf34c1d0c82d185d.zip
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 */