patch "iio: tmp006: Check channel info on write" added to staging-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iio: tmp006: Check channel info on write
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
f451957dafe712ab2cd4b7ca8ba9197798115fbeMon Sep 17 00:00:00 2001
From: Peter Meerwald <[email protected]>
Date: Sun, 21 Jun 2015 23:50:21 +0200
Subject: iio: tmp006: Check channel info on write
only SAMP_FREQ is writable
Will lead to SAMP_FREQ being written by any attempt to write to the other exported attributes and hence a rather unexpected result!
--- drivers/iio/temperature/tmp006.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/iio/temperature/tmp006.c +3 -0
@@ -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 ])) {
Signature · 1 line
2.4.6