Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58b90a8d authored by Sandhya Bankar's avatar Sandhya Bankar Committed by Jonathan Cameron
Browse files

drivers: iio: max1027: Fix sparse warning: "dubious: x | !y"



Fixing below warning:
drivers/iio/adc/max1027.c:241:34: warning: dubious: x | !y .

Signed-off-by: default avatarSandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 057ac1ac
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -238,7 +238,9 @@ static int max1027_read_single_value(struct iio_dev *indio_dev,

	/* Configure conversion register with the requested chan */
	st->reg = MAX1027_CONV_REG | MAX1027_CHAN(chan->channel) |
		  MAX1027_NOSCAN | !!(chan->type == IIO_TEMP);
		  MAX1027_NOSCAN;
	if (chan->type == IIO_TEMP)
		st->reg |= MAX1027_TEMP;
	ret = spi_write(st->spi, &st->reg, 1);
	if (ret < 0) {
		dev_err(&indio_dev->dev,