On 03/10/14 14:50, Denis CIOCCA wrote: > Acked-by: Denis Ciocca <denis.ciocca@xxxxxx> Applied to fixes-togreg branch of iio.git and marked for stable. Note that given the timing this will probably not hit mainline until after the coming merge window. Only after that will it get picked up for stable. Jonathan > > Thanks! > > Denis > > On 09/29/14 15:00, Robin van der Gracht wrote: >> Use byte_for_channel as iterator to properly initialize the buffer. >> >> Signed-off-by: Robin van der Gracht <robin@xxxxxxxxxxx> >> --- >> drivers/iio/common/st_sensors/st_sensors_buffer.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/iio/common/st_sensors/st_sensors_buffer.c b/drivers/iio/common/st_sensors/st_sensors_buffer.c >> index 1665c8e..e18bc67 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 > -- > To unsubscribe from this list: send the line "unsubscribe linux-iio" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html