]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
iio: light: gp2ap020a00f: fix iio_triggered_buffer_{predisable,postenable} positions
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Fri, 6 Mar 2020 11:11:37 +0000 (13:11 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 8 Mar 2020 17:28:54 +0000 (17:28 +0000)
commita305b0c9edd29ec6f571179c34d5529fae50d6b9
tree7734f5e6cc49fc662b5e3b6539d5fdd9b35d9ea9
parentd7cf5f60474cf591db771bc15e3b7320be5399e0
iio: light: gp2ap020a00f: 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 moves the postenable/predisable hooks into the correct
positions.

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