linux/drivers/iio/imu/st_lsm6dsx
Lorenzo Bianconi 91a6b841a5 iio: imu: st_lsm6dsx: pre-allocate read buffer at bootstrap
Allocate device read buffer at bootstrap and do not put it on the stack
since it is pretty big (~200B) and its size will increase adding support
to device hw timestamp.
Moreover this patch fixes following sparse warnings:
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c:250:17: warning: Variable length
array is used.
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c:283:55: error: cannot size
expression

Fixes: 290a6ce11d ("iio: imu: add support to lsm6dsx driver")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08 16:03:43 +01:00
..
Kconfig iio: imu: st_lsm6dsx: add regmap API support 2018-01-08 16:03:43 +01:00
Makefile
st_lsm6dsx_buffer.c iio: imu: st_lsm6dsx: pre-allocate read buffer at bootstrap 2018-01-08 16:03:43 +01:00
st_lsm6dsx_core.c iio: imu: st_lsm6dsx: pre-allocate read buffer at bootstrap 2018-01-08 16:03:43 +01:00
st_lsm6dsx_i2c.c iio: imu: st_lsm6dsx: add regmap API support 2018-01-08 16:03:43 +01:00
st_lsm6dsx_spi.c iio: imu: st_lsm6dsx: add regmap API support 2018-01-08 16:03:43 +01:00
st_lsm6dsx.h iio: imu: st_lsm6dsx: pre-allocate read buffer at bootstrap 2018-01-08 16:03:43 +01:00