staging: iio: adc: ad7606: Use wait-for-completion handler
authorStefan Popa <stefan.popa@analog.com>
Thu, 13 Dec 2018 12:46:15 +0000 (14:46 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 22 Dec 2018 16:58:12 +0000 (16:58 +0000)
commit557e585c3fdba1f6cddb4516a82da53b52fd9963
treecd461b82cbfa0a383913f8e33e6d0076ac1aa1a4
parent4535fa0576d2bb14060a7e80a710382414a93558
staging: iio: adc: ad7606: Use wait-for-completion handler

This patch replaces the use of wait_event_interruptible() with
wait_for_completion_timeout() when reading the result of a single
conversion. In this way, if the interrupt never occurs, the program will
not remain blocked.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/adc/ad7606.c
drivers/staging/iio/adc/ad7606.h