summaryrefslogtreecommitdiffstats
path: root/drivers/iio/temperature/tmp006.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-20 22:21:28 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-20 22:21:28 +0200
commited15e8880fc3d8d52bc02a02521054bfcb26264a (patch)
tree816a7f35028762976f5d4bc4df172e407c4bcbe2 /drivers/iio/temperature/tmp006.c
parentstaging: dgap: remove duplicate code (diff)
parentLinux 4.2-rc3 (diff)
downloadlinux-ed15e8880fc3d8d52bc02a02521054bfcb26264a.tar.xz
linux-ed15e8880fc3d8d52bc02a02521054bfcb26264a.zip
Merge 4.2-rc3 into staging-next
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/temperature/tmp006.c')
-rw-r--r--drivers/iio/temperature/tmp006.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iio/temperature/tmp006.c b/drivers/iio/temperature/tmp006.c
index 395df23d7c8c..e78c1069a6a9 100644
--- a/drivers/iio/temperature/tmp006.c
+++ b/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])) {