summaryrefslogtreecommitdiff
path: root/drivers/iio/common
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-25 10:09:39 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-25 10:09:39 +0800
commit7e74783a9db72e5fec30eb6129a63f274df42288 (patch)
tree84fe13a1b9ae136ff18bdeffa65ded9f2c3d18a8 /drivers/iio/common
parent54d5c5cd0fb232d13c547cae969a0f1312b455b6 (diff)
parent75d7ed3b9e7cb79a3b0e1f417fb674d54b4fc668 (diff)
Merge tag 'iio-fixes-for-3.18a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes: First round of IIO fixes for the 3.18 cycle. * ad5933 - fix a null pointer dereference due to an old change that prevents different channels being registered for the buffer and used for sysfs interfaces. * ad5933 - Drop a bonus _raw from attribute names. * st-sensors - Makes sure the correct number of elements are copied when filling a local buffer copy. * mxs-lradc - Disable clocks in a failure path during probe so they aren't left running.
Diffstat (limited to 'drivers/iio/common')
-rw-r--r--drivers/iio/common/st_sensors/st_sensors_buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/common/st_sensors/st_sensors_buffer.c b/drivers/iio/common/st_sensors/st_sensors_buffer.c
index 1665c8e4b62b..e18bc6782256 100644
--- a/drivers/iio/common/st_sensors/st_sensors_buffer.c
+++ b/drivers/iio/common/st_sensors/st_sensors_buffer.c
@@ -71,7 +71,7 @@ int st_sensors_get_buffer_element(struct iio_dev *indio_dev, u8 *buf)
goto st_sensors_free_memory;
}
- for (i = 0; i < n * num_data_channels; i++) {
+ for (i = 0; i < n * byte_for_channel; i++) {
if (i < n)
buf[i] = rx_array[i];
else