diff options
Diffstat (limited to 'drivers/macintosh/therm_pm72.c')
-rw-r--r-- | drivers/macintosh/therm_pm72.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 2e041fd0a00c..f3a29f264db9 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -443,7 +443,7 @@ static int fan_read_reg(int reg, unsigned char *buf, int nb) | |||
443 | tries = 0; | 443 | tries = 0; |
444 | for (;;) { | 444 | for (;;) { |
445 | nr = i2c_master_recv(fcu, buf, nb); | 445 | nr = i2c_master_recv(fcu, buf, nb); |
446 | if (nr > 0 || (nr < 0 && nr != ENODEV) || tries >= 100) | 446 | if (nr > 0 || (nr < 0 && nr != -ENODEV) || tries >= 100) |
447 | break; | 447 | break; |
448 | msleep(10); | 448 | msleep(10); |
449 | ++tries; | 449 | ++tries; |
@@ -464,7 +464,7 @@ static int fan_write_reg(int reg, const unsigned char *ptr, int nb) | |||
464 | tries = 0; | 464 | tries = 0; |
465 | for (;;) { | 465 | for (;;) { |
466 | nw = i2c_master_send(fcu, buf, nb); | 466 | nw = i2c_master_send(fcu, buf, nb); |
467 | if (nw > 0 || (nw < 0 && nw != EIO) || tries >= 100) | 467 | if (nw > 0 || (nw < 0 && nw != -EIO) || tries >= 100) |
468 | break; | 468 | break; |
469 | msleep(10); | 469 | msleep(10); |
470 | ++tries; | 470 | ++tries; |