Skip to content

Commit ba9c5fc

Browse files
andy-shevgroeck
authored andcommitted
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>
1 parent 97387c2 commit ba9c5fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/lm70.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static int lm70_probe(struct spi_device *spi)
161161

162162

163163
/* signaling is SPI_MODE_0 */
164-
if (spi->mode & (SPI_CPOL | SPI_CPHA))
164+
if ((spi->mode & SPI_MODE_X_MASK) != SPI_MODE_0)
165165
return -EINVAL;
166166

167167
/* NOTE: we assume 8-bit words, and convert to 16 bits manually */

0 commit comments

Comments
 (0)