iio: tmp006: Check channel info on write
authorPeter Meerwald <pmeerw@pmeerw.net>
Sun, 21 Jun 2015 21:50:21 +0000 (23:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 16:29:02 +0000 (09:29 -0700)
commit21b9c4eca727901b770d387aead27b344dc7f9f6
treefa8c4b007bbe4e0da5c89d8d395bcd34e4491843
parent85250adce4a27debef10bd510ddfc4de928b4586
iio: tmp006: Check channel info on write

commit 8d05abfaeff52bdf66aba3a3a337dcdbdb4911bf upstream.

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!

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/temperature/tmp006.c