diff options
-rw-r--r-- | drivers/rtc/rtc-ds1374.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c index 640acd20fdde..a150418fba76 100644 --- a/drivers/rtc/rtc-ds1374.c +++ b/drivers/rtc/rtc-ds1374.c | |||
@@ -173,7 +173,7 @@ static int ds1374_read_alarm(struct device *dev, struct rtc_wkalrm *alarm) | |||
173 | int cr, sr; | 173 | int cr, sr; |
174 | int ret = 0; | 174 | int ret = 0; |
175 | 175 | ||
176 | if (client->irq < 0) | 176 | if (client->irq <= 0) |
177 | return -EINVAL; | 177 | return -EINVAL; |
178 | 178 | ||
179 | mutex_lock(&ds1374->mutex); | 179 | mutex_lock(&ds1374->mutex); |
@@ -212,7 +212,7 @@ static int ds1374_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) | |||
212 | int cr; | 212 | int cr; |
213 | int ret = 0; | 213 | int ret = 0; |
214 | 214 | ||
215 | if (client->irq < 0) | 215 | if (client->irq <= 0) |
216 | return -EINVAL; | 216 | return -EINVAL; |
217 | 217 | ||
218 | ret = ds1374_read_time(dev, &now); | 218 | ret = ds1374_read_time(dev, &now); |
@@ -381,7 +381,7 @@ static int ds1374_probe(struct i2c_client *client, | |||
381 | if (ret) | 381 | if (ret) |
382 | goto out_free; | 382 | goto out_free; |
383 | 383 | ||
384 | if (client->irq >= 0) { | 384 | if (client->irq > 0) { |
385 | ret = request_irq(client->irq, ds1374_irq, 0, | 385 | ret = request_irq(client->irq, ds1374_irq, 0, |
386 | "ds1374", client); | 386 | "ds1374", client); |
387 | if (ret) { | 387 | if (ret) { |
@@ -401,7 +401,7 @@ static int ds1374_probe(struct i2c_client *client, | |||
401 | return 0; | 401 | return 0; |
402 | 402 | ||
403 | out_irq: | 403 | out_irq: |
404 | if (client->irq >= 0) | 404 | if (client->irq > 0) |
405 | free_irq(client->irq, client); | 405 | free_irq(client->irq, client); |
406 | 406 | ||
407 | out_free: | 407 | out_free: |
@@ -414,7 +414,7 @@ static int __devexit ds1374_remove(struct i2c_client *client) | |||
414 | { | 414 | { |
415 | struct ds1374 *ds1374 = i2c_get_clientdata(client); | 415 | struct ds1374 *ds1374 = i2c_get_clientdata(client); |
416 | 416 | ||
417 | if (client->irq >= 0) { | 417 | if (client->irq > 0) { |
418 | mutex_lock(&ds1374->mutex); | 418 | mutex_lock(&ds1374->mutex); |
419 | ds1374->exiting = 1; | 419 | ds1374->exiting = 1; |
420 | mutex_unlock(&ds1374->mutex); | 420 | mutex_unlock(&ds1374->mutex); |