There were just a handful of more while loops in this file that needed
timeouts, and this patch takes care of them. One new callback is
introduced, and all of the proper comedi_timeout() calls are then used.
The return type of s626_i2c_handshake() has been changed from uint32_t to
int so that a negative error code from comedi_timeout() can be propagated
if necessary.
Signed-off-by: Chase Southwood <chase.southwood@xxxxxxxxx>
---
2: s626_i2c_handshake_eoc() can be used in s626_initialize() as noted by
Ian. So, s626_initialize_eoc() has been removed, and its uses swapped
for s626_i2c_handshake_eoc().
3: *Type of 'status' variable in s626_i2c_handshake_eoc() has been
corrected to bool (the return type of s626_mc_test()).
*Return type of s626_i2c_handshake() has been changed to int to allow
returning negative error codes.
*Type of 'ret' variable in the same function has been changed to int for
the same reason.
drivers/staging/comedi/drivers/s626.c | 36 ++++++++++++++++++++++++++---------
1 file changed, 27 insertions(+), 9 deletions(-)