Axel Lin 644a9d3b66 misc: apds9802als: Fix the logic checking timeout in als_wait_for_data_ready()
In the case of timeout waiting for data ready, the retry variable is -1.
This also fixes a bug: current code returns -ETIMEDOUT if latest retry success
( which means retry is 0 when exiting the while loop ).

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16 04:53:08 -08:00
..
2012-09-05 14:10:29 -07:00
2012-10-10 20:15:24 +09:00
2012-08-16 10:09:15 -07:00
2011-07-26 16:49:47 -07:00
2012-08-10 13:29:57 -07:00
2012-09-05 14:10:29 -07:00