From: 张晴 Date: Tue, 22 Apr 2014 09:56:26 +0000 (+0800) Subject: rk3288:pmic:rk808&rk818:modify rtc alam updata warning X-Git-Tag: firefly_0821_release~5467 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1de10985f1138dc089d05948fa32dafe58d04a27;p=firefly-linux-kernel-4.4.55.git rk3288:pmic:rk808&rk818:modify rtc alam updata warning --- diff --git a/drivers/rtc/rtc-rk808.c b/drivers/rtc/rtc-rk808.c index b79fed58a9c5..911f7eea68c9 100755 --- a/drivers/rtc/rtc-rk808.c +++ b/drivers/rtc/rtc-rk808.c @@ -471,7 +471,7 @@ static int rk808_rtc_suspend(struct device *dev) else ret = rk808_rtc_stop_alarm(rk808_rtc); - if (ret != 0) + if (ret < 0) dev_err(&pdev->dev, "Failed to update RTC alarm: %d\n", ret); return 0; @@ -488,7 +488,7 @@ static int rk808_rtc_resume(struct device *dev) if (rk808_rtc->alarm_enabled) { ret = rk808_rtc_start_alarm(rk808_rtc); - if (ret != 0) + if (ret <0) dev_err(&pdev->dev, "Failed to restart RTC alarm: %d\n", ret); } @@ -504,7 +504,7 @@ static int rk808_rtc_freeze(struct device *dev) int ret; ret = rk808_rtc_stop_alarm(rk808_rtc); - if (ret != 0) + if (ret < 0) dev_err(&pdev->dev, "Failed to stop RTC alarm: %d\n", ret); return 0; diff --git a/drivers/rtc/rtc-rk818.c b/drivers/rtc/rtc-rk818.c index 29082ef9c921..c61047d0ab43 100755 --- a/drivers/rtc/rtc-rk818.c +++ b/drivers/rtc/rtc-rk818.c @@ -472,7 +472,7 @@ static int rk818_rtc_suspend(struct device *dev) else ret = rk818_rtc_stop_alarm(rk818_rtc); - if (ret != 0) + if (ret < 0) dev_err(&pdev->dev, "Failed to update RTC alarm: %d\n", ret); return 0; @@ -489,7 +489,7 @@ static int rk818_rtc_resume(struct device *dev) if (rk818_rtc->alarm_enabled) { ret = rk818_rtc_start_alarm(rk818_rtc); - if (ret != 0) + if (ret < 0) dev_err(&pdev->dev, "Failed to restart RTC alarm: %d\n", ret); } @@ -505,7 +505,7 @@ static int rk818_rtc_freeze(struct device *dev) int ret; ret = rk818_rtc_stop_alarm(rk818_rtc); - if (ret != 0) + if (ret < 0) dev_err(&pdev->dev, "Failed to stop RTC alarm: %d\n", ret); return 0;