int err, sip, acc_sip, gyro_sip, ts_sip, ext_sip, read_len, offset;
        u16 fifo_len, pattern_len = hw->sip * ST_LSM6DSX_SAMPLE_SIZE;
        u16 fifo_diff_mask = hw->settings->fifo_ops.fifo_diff.mask;
-       u8 gyro_buff[ST_LSM6DSX_IIO_BUFF_SIZE];
-       u8 acc_buff[ST_LSM6DSX_IIO_BUFF_SIZE];
-       u8 ext_buff[ST_LSM6DSX_IIO_BUFF_SIZE];
        bool reset_ts = false;
        __le16 fifo_status;
        s64 ts = 0;
 
                while (acc_sip > 0 || gyro_sip > 0 || ext_sip > 0) {
                        if (gyro_sip > 0 && !(sip % gyro_sensor->decimator)) {
-                               memcpy(gyro_buff, &hw->buff[offset],
-                                      ST_LSM6DSX_SAMPLE_SIZE);
-                               offset += ST_LSM6DSX_SAMPLE_SIZE;
+                               memcpy(hw->scan[ST_LSM6DSX_ID_GYRO].channels,
+                                      &hw->buff[offset],
+                                      sizeof(hw->scan[ST_LSM6DSX_ID_GYRO].channels));
+                               offset += sizeof(hw->scan[ST_LSM6DSX_ID_GYRO].channels);
                        }
                        if (acc_sip > 0 && !(sip % acc_sensor->decimator)) {
-                               memcpy(acc_buff, &hw->buff[offset],
-                                      ST_LSM6DSX_SAMPLE_SIZE);
-                               offset += ST_LSM6DSX_SAMPLE_SIZE;
+                               memcpy(hw->scan[ST_LSM6DSX_ID_ACC].channels,
+                                      &hw->buff[offset],
+                                      sizeof(hw->scan[ST_LSM6DSX_ID_ACC].channels));
+                               offset += sizeof(hw->scan[ST_LSM6DSX_ID_ACC].channels);
                        }
                        if (ext_sip > 0 && !(sip % ext_sensor->decimator)) {
-                               memcpy(ext_buff, &hw->buff[offset],
-                                      ST_LSM6DSX_SAMPLE_SIZE);
-                               offset += ST_LSM6DSX_SAMPLE_SIZE;
+                               memcpy(hw->scan[ST_LSM6DSX_ID_EXT0].channels,
+                                      &hw->buff[offset],
+                                      sizeof(hw->scan[ST_LSM6DSX_ID_EXT0].channels));
+                               offset += sizeof(hw->scan[ST_LSM6DSX_ID_EXT0].channels);
                        }
 
                        if (ts_sip-- > 0) {
                        if (gyro_sip > 0 && !(sip % gyro_sensor->decimator)) {
                                iio_push_to_buffers_with_timestamp(
                                        hw->iio_devs[ST_LSM6DSX_ID_GYRO],
-                                       gyro_buff, gyro_sensor->ts_ref + ts);
+                                       &hw->scan[ST_LSM6DSX_ID_GYRO],
+                                       gyro_sensor->ts_ref + ts);
                                gyro_sip--;
                        }
                        if (acc_sip > 0 && !(sip % acc_sensor->decimator)) {
                                iio_push_to_buffers_with_timestamp(
                                        hw->iio_devs[ST_LSM6DSX_ID_ACC],
-                                       acc_buff, acc_sensor->ts_ref + ts);
+                                       &hw->scan[ST_LSM6DSX_ID_ACC],
+                                       acc_sensor->ts_ref + ts);
                                acc_sip--;
                        }
                        if (ext_sip > 0 && !(sip % ext_sensor->decimator)) {
                                iio_push_to_buffers_with_timestamp(
                                        hw->iio_devs[ST_LSM6DSX_ID_EXT0],
-                                       ext_buff, ext_sensor->ts_ref + ts);
+                                       &hw->scan[ST_LSM6DSX_ID_EXT0],
+                                       ext_sensor->ts_ref + ts);
                                ext_sip--;
                        }
                        sip++;
 {
        u16 pattern_len = hw->sip * ST_LSM6DSX_TAGGED_SAMPLE_SIZE;
        u16 fifo_len, fifo_diff_mask;
-       u8 iio_buff[ST_LSM6DSX_IIO_BUFF_SIZE], tag;
+       /*
+        * Alignment needed as this can ultimately be passed to a
+        * call to iio_push_to_buffers_with_timestamp() which
+        * must be passed a buffer that is aligned to 8 bytes so
+        * as to allow insertion of a naturally aligned timestamp.
+        */
+       u8 iio_buff[ST_LSM6DSX_IIO_BUFF_SIZE] __aligned(8);
+       u8 tag;
        bool reset_ts = false;
        int i, err, read_len;
        __le16 fifo_status;