projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97387c2
)
hwmon: (lm70) Use SPI_MODE_X_MASK
author
Andy Shevchenko
<andriy.shevchenko@linux.intel.com>
Mon, 10 May 2021 14:13:31 +0000
(17:13 +0300)
committer
Guenter Roeck
<linux@roeck-us.net>
Thu, 17 Jun 2021 11:21:44 +0000
(
04:21
-0700)
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>
drivers/hwmon/lm70.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/lm70.c
b/drivers/hwmon/lm70.c
index 6b884ea0098778e5695a19590e64fe9664569e75..d2a60de5b8de9d66918247c2c4ae8870dcfb5d6e 100644
(file)
--- 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 */