]> git.baikalelectronics.ru Git - kernel.git/commit
iio: light: isl29125: fix iio_triggered_buffer_{predisable,postenable} positions
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Wed, 4 Mar 2020 08:24:25 +0000 (10:24 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 19 Apr 2020 15:56:41 +0000 (16:56 +0100)
commitfdbe4ab64fde66904c194b943524cee4feb3358b
tree724890783416a11458579538317de763641a0038
parent281dae1c32e807f66af55f4e5b81a37f496069f1
iio: light: isl29125: fix iio_triggered_buffer_{predisable,postenable} positions

The iio_triggered_buffer_{predisable,postenable} functions attach/detach
the poll functions.

For the predisable hook, the disable code should occur before detaching
the poll func, and for the postenable hook, the poll func should be
attached before the enable code.

This change reworks the predisable/postenable hooks so that the pollfunc is
attached/detached in the correct position.
It also balances the calls a bit, by grouping the preenable and the
iio_triggered_buffer_postenable() into a single
isl29125_buffer_postenable() function.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/isl29125.c