From: wdc Date: Sat, 12 Jul 2014 06:57:51 +0000 (+0800) Subject: 3036: fix hym gpio judgement X-Git-Tag: firefly_0821_release~4916^2~254^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=74b63344fd8c7cd5a2fef85a28ccc8fd8bca8365;p=firefly-linux-kernel-4.4.55.git 3036: fix hym gpio judgement --- diff --git a/drivers/rtc/rtc-HYM8563.c b/drivers/rtc/rtc-HYM8563.c index d30da29f39ee..c20f4b867bfe 100755 --- a/drivers/rtc/rtc-HYM8563.c +++ b/drivers/rtc/rtc-HYM8563.c @@ -592,7 +592,7 @@ static int hym8563_probe(struct i2c_client *client, const struct i2c_device_id } client->irq = of_get_named_gpio_flags(np, "irq_gpio", 0,(enum of_gpio_flags *)&irq_flags); - if(client->irq < 0) + if(client->irq >= 0) { hym8563->irq = gpio_to_irq(client->irq); result = devm_request_threaded_irq(&client->dev, hym8563->irq, NULL, hym8563_wakeup_irq, irq_flags | IRQF_ONESHOT, client->dev.driver->name,hym8563 );