diff mbox

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

Message ID 1379368875-14397-1-git-send-email-yorksun@freescale.com
State Rejected
Headers show

Commit Message

York Sun Sept. 16, 2013, 10:01 p.m. UTC
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(-)

Comments

York Sun Sept. 16, 2013, 11:39 p.m. UTC | #1
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
diff mbox

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