Patchwork [v2] i2c/rtc-ds3232: Fix irq for probing

login
register
mail settings
Submitter York Sun
Date Sept. 16, 2013, 10:01 p.m.
Message ID <1379368875-14397-1-git-send-email-yorksun@freescale.com>
Download mbox | patch
Permalink /patch/275293/
State New
Headers show

Comments

York Sun - Sept. 16, 2013, 10:01 p.m.
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@freescale.com>
---
Change log:
 v2: remote reviewed-by and tested-by lines added by gerrit
     send to proper mailing list

 drivers/rtc/rtc-ds3232.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
York Sun - Sept. 16, 2013, 11:39 p.m.
On 09/16/2013 03:01 PM, York Sun wrote:
> 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@freescale.com>
> ---
> Change log:
>  v2: remote reviewed-by and tested-by lines added by gerrit
>      send to proper mailing list
> 

Pardon my typo. I meant to type "remove", instead of "remote".

York

Patch

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) {