summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/iio/temperature/tmp006.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/iio/temperature/tmp006.c')
-rw-r--r--kernel/drivers/iio/temperature/tmp006.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/drivers/iio/temperature/tmp006.c b/kernel/drivers/iio/temperature/tmp006.c
index 84a0789c3..7a8050996 100644
--- a/kernel/drivers/iio/temperature/tmp006.c
+++ b/kernel/drivers/iio/temperature/tmp006.c
@@ -132,6 +132,9 @@ static int tmp006_write_raw(struct iio_dev *indio_dev,
struct tmp006_data *data = iio_priv(indio_dev);
int i;
+ if (mask != IIO_CHAN_INFO_SAMP_FREQ)
+ return -EINVAL;
+
for (i = 0; i < ARRAY_SIZE(tmp006_freqs); i++)
if ((val == tmp006_freqs[i][0]) &&
(val2 == tmp006_freqs[i][1])) {