--- zzzz-none-000/linux-3.10.107/drivers/iio/common/st_sensors/st_sensors_spi.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/iio/common/st_sensors/st_sensors_spi.c 2021-02-04 17:41:59.000000000 +0000 @@ -54,7 +54,7 @@ if (err) goto acc_spi_read_error; - memcpy(data, tb->rx_buf, len*sizeof(u8)); + memcpy(data, tb->rx_buf, len); mutex_unlock(&tb->buf_lock); return len; @@ -111,6 +111,7 @@ indio_dev->dev.parent = &spi->dev; indio_dev->name = spi->modalias; + sdata->dev = &spi->dev; sdata->tf = &st_sensors_tf_spi; sdata->get_irq_data_ready = st_sensors_spi_get_irq; }