Commit 362cd500 authored by Melissa Wen's avatar Melissa Wen Committed by Jonathan Cameron
Browse files

staging: iio: ad7150: use ternary operating to ensure 0/1 value



Remove idiom and use ternary operator for consistently trigger 0/1 value
on variable declaration.

Signed-off-by: default avatarMelissa Wen <melissa.srw@gmail.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 387c1d77
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -350,8 +350,8 @@ static ssize_t ad7150_show_timeout(struct device *dev,

	/* use the event code for consistency reasons */
	int chan = IIO_EVENT_CODE_EXTRACT_CHAN(this_attr->address);
	int rising = !!(IIO_EVENT_CODE_EXTRACT_DIR(this_attr->address)
			== IIO_EV_DIR_RISING);
	int rising = (IIO_EVENT_CODE_EXTRACT_DIR(this_attr->address)
		      == IIO_EV_DIR_RISING) ? 1 : 0;

	switch (IIO_EVENT_CODE_EXTRACT_TYPE(this_attr->address)) {
	case IIO_EV_TYPE_MAG_ADAPTIVE: