aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/iio/cdc/ad7150.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
index 047af2376300..a2b7ae3329c0 100644
--- a/drivers/staging/iio/cdc/ad7150.c
+++ b/drivers/staging/iio/cdc/ad7150.c
@@ -143,19 +143,15 @@ static int ad7150_read_event_config(struct iio_dev *indio_dev,
143 case IIO_EV_TYPE_MAG_ADAPTIVE: 143 case IIO_EV_TYPE_MAG_ADAPTIVE:
144 if (dir == IIO_EV_DIR_RISING) 144 if (dir == IIO_EV_DIR_RISING)
145 return adaptive && (threshtype == 0x1); 145 return adaptive && (threshtype == 0x1);
146 else 146 return adaptive && (threshtype == 0x0);
147 return adaptive && (threshtype == 0x0);
148 case IIO_EV_TYPE_THRESH_ADAPTIVE: 147 case IIO_EV_TYPE_THRESH_ADAPTIVE:
149 if (dir == IIO_EV_DIR_RISING) 148 if (dir == IIO_EV_DIR_RISING)
150 return adaptive && (threshtype == 0x3); 149 return adaptive && (threshtype == 0x3);
151 else 150 return adaptive && (threshtype == 0x2);
152 return adaptive && (threshtype == 0x2);
153
154 case IIO_EV_TYPE_THRESH: 151 case IIO_EV_TYPE_THRESH:
155 if (dir == IIO_EV_DIR_RISING) 152 if (dir == IIO_EV_DIR_RISING)
156 return !adaptive && (threshtype == 0x1); 153 return !adaptive && (threshtype == 0x1);
157 else 154 return !adaptive && (threshtype == 0x0);
158 return !adaptive && (threshtype == 0x0);
159 default: 155 default:
160 break; 156 break;
161 } 157 }