]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: temperature: ltc2983: Fix reinit_completion() called after conversion start
authorLiviu Stan <liviu.stan@analog.com>
Mon, 25 May 2026 16:39:29 +0000 (19:39 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 31 May 2026 10:01:50 +0000 (11:01 +0100)
commit5cb9fdb446bfc3ae0524496f53fb68e67051701b
tree6fece5b2f445309cdd7f817ba6ff65a17d6ba6ea
parent434c150752675f44dc52c384a7fa22e5176bc35a
iio: temperature: ltc2983: Fix reinit_completion() called after conversion start

reinit_completion() was called after regmap_write() initiated the hardware
conversion, creating a race window where the interrupt could fire and call
complete() before reinit_completion() reset the completion.

Move reinit_completion() before the regmap_write() to close the race.
ltc2983_eeprom_cmd() already does it in the correct order.

Fixes: f110f3188e56 ("iio: temperature: Add support for LTC2983")
Signed-off-by: Liviu Stan <liviu.stan@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/temperature/ltc2983.c