summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-25 04:09:39 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-25 04:09:39 +0200
commit7e74783a9db72e5fec30eb6129a63f274df42288 (patch)
tree84fe13a1b9ae136ff18bdeffa65ded9f2c3d18a8 /drivers/iio
parentstaging: rtl8723au: Fix alignment of mac_addr for ether_addr_copy() usage (diff)
parentiio: adc: mxs-lradc: Disable the clock on probe failure (diff)
downloadlinux-7e74783a9db72e5fec30eb6129a63f274df42288.tar.xz
linux-7e74783a9db72e5fec30eb6129a63f274df42288.zip
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')
-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