]> git.baikalelectronics.ru Git - kernel.git/commit
iio: st_sensors: simplify buffer address handling
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 24 Mar 2016 13:18:03 +0000 (14:18 +0100)
committerJonathan Cameron <jic23@kernel.org>
Mon, 28 Mar 2016 07:51:39 +0000 (08:51 +0100)
commitb53511f0957df616dfe3ebfaf6674bf914ff0b6e
treef31d70478f2f2fd3a1634fe27beb1d3a6e1b86d7
parentf59366300080b48003e1a4d76140f3c1fa031831
iio: st_sensors: simplify buffer address handling

The driver goes to some length to dynamically allocate an array
to hold the channel addresses. However no ST sensor has more than
three channels (x, y, z at most). Instead of kmalloc():ing and
kfree():in the address array, just use a fixed array of three
elements.

Cc: Giuseppe Barba <giuseppe.barba@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/common/st_sensors/st_sensors_buffer.c