iio:st_sensors: remove buffer allocation at each buffer enable
authorDenis Ciocca <denis.ciocca@st.com>
Mon, 5 Aug 2019 18:57:11 +0000 (11:57 -0700)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 11 Aug 2019 08:26:04 +0000 (09:26 +0100)
commite031d5f558f1535968df1ecae8d734b84c17f78d
tree663fb1b5ab579c6486d387e5dabe3ab747535e86
parent854da7511a05c9a05a4f28fb2225349380520b96
iio:st_sensors: remove buffer allocation at each buffer enable

This patch is removing the buffer allocation at each buffer enable.
We just allocate enough memory in the main structure during probe
to cover maximum size needed (that anyway is pretty small) [16bytes].

Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/st_accel_buffer.c
drivers/iio/gyro/st_gyro_buffer.c
drivers/iio/magnetometer/st_magn_buffer.c
drivers/iio/pressure/st_pressure_buffer.c
include/linux/iio/common/st_sensors.h