On Wed, 17 Jun 2020 21:29:07 -0400
Sasha Levin <sashal@xxxxxxxxxx> wrote:
From: Alexandru Ardelean <alexandru.ardelean@xxxxxxxxxx>
[ Upstream commit 9b7a12c3e090cf3fba6f66f1f23abbc6e0e86021 ]
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.
This is really part of some rework. It doesn't 'fix' a bug
as such (I think), but rather a bit of logical inconsistency.
Shouldn't do any harm though beyond adding noise to stable.
I added notes to some of these to mark them as not stable material,
but clearly missed this one. Sorry about that.