mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
iio: adc: ti-ads1119: Reinit completion before wait_for_completion_timeout()
The completion is not reinit before wait_for_completion_timeout(),
so wait_for_completion_timeout() will return immediately after
the first successful completion.
Fixes: a9306887eb ("iio: adc: ti-ads1119: Add driver")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
6f658d19a5
commit
2f16809417
|
|
@ -280,6 +280,9 @@ static int ads1119_single_conversion(struct ads1119_state *st,
|
|||
if (ret)
|
||||
goto pdown;
|
||||
|
||||
if (st->client->irq)
|
||||
reinit_completion(&st->completion);
|
||||
|
||||
ret = i2c_smbus_write_byte(st->client, ADS1119_CMD_START_SYNC);
|
||||
if (ret)
|
||||
goto pdown;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user