rk3288:pmic:rk808&rk818:modify rtc alam updata warning
author张晴 <zhangqing@rock-chips.com>
Tue, 22 Apr 2014 09:56:26 +0000 (17:56 +0800)
committer张晴 <zhangqing@rock-chips.com>
Tue, 22 Apr 2014 09:56:26 +0000 (17:56 +0800)
drivers/rtc/rtc-rk808.c
drivers/rtc/rtc-rk818.c

index b79fed58a9c5319b8b6df2a815f28f0a59f0b86d..911f7eea68c990bcd166350e0836312f038501c4 100755 (executable)
@@ -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;
index 29082ef9c921b18c0d9d939c0673c2cb935f479d..c61047d0ab439449c9a4417419a78251eff44ceb 100755 (executable)
@@ -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;