[PATCH 3/7] i2c/rtc-ds3232: Fix irq for probing

York Sun yorksun at freescale.com
Sat Sep 7 01:43:15 EST 2013


Driver shouldn't request irq when irq = 0. It is returned from parsing
device tree. 0 means no interrupt.

Signed-off-by: York Sun <yorksun at freescale.com>
Reviewed-by: Zang Tiefei-R61911 <tie-fei.zang at freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING at freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING at freescale.com>
---
 drivers/rtc/rtc-ds3232.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
index b83bb5a5..ae8a28e 100644
--- a/drivers/rtc/rtc-ds3232.c
+++ b/drivers/rtc/rtc-ds3232.c
@@ -418,7 +418,7 @@ static int ds3232_probe(struct i2c_client *client,
 		return PTR_ERR(ds3232->rtc);
 	}
 
-	if (client->irq >= 0) {
+	if (client->irq > 0) {
 		ret = devm_request_irq(&client->dev, client->irq, ds3232_irq, 0,
 				 "ds3232", client);
 		if (ret) {
-- 
1.7.9.5




More information about the Linuxppc-dev mailing list