[09/11] Correct wait_event_timeout error return check.
Commit Message
From: "Steinar H. Gunderson" <sesse@samfundet.no>
wait_event_timeout() returns 0 on timeout, not -ERESTARTSYS.
Note that since this actually causes timeouts to be handled,
it makes the CA situation a lot worse without the next patch
in the series.
---
drivers/media/dvb/mantis/mantis_hif.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -47,7 +47,7 @@ static int mantis_hif_sbuf_opdone_wait(struct mantis_ca *ca)
if (wait_event_timeout(ca->hif_opdone_wq,
test_and_clear_bit(MANTIS_SBUF_OPDONE_BIT, &ca->hif_event),
- msecs_to_jiffies(500)) == -ERESTARTSYS) {
+ msecs_to_jiffies(500)) == 0) {
dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): Smart buffer operation timeout !", mantis->num);
rc = -EREMOTEIO;
@@ -63,7 +63,7 @@ static int mantis_hif_write_wait(struct mantis_ca *ca)
if (wait_event_timeout(ca->hif_write_wq,
test_and_clear_bit(MANTIS_GPIF_WRACK_BIT, &mantis->gpif_status),
- msecs_to_jiffies(500)) == -ERESTARTSYS) {
+ msecs_to_jiffies(500)) == 0) {
dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): Write ACK timed out !", mantis->num);
rc = -EREMOTEIO;