diff mbox

[v5,4/4] rtc: Remove redundant rtc_valid_tm() from rtc_resume()

Message ID 1425882471-5591-4-git-send-email-xlpang@126.com
State New
Headers show

Commit Message

Xunlei Pang March 9, 2015, 6:27 a.m. UTC
From: Xunlei Pang <pang.xunlei@linaro.org>

rtc_read_time() has already judged valid tm by rtc_valid_tm(),
so just remove it.

Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
---
 drivers/rtc/class.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

John Stultz March 18, 2015, 5:26 p.m. UTC | #1
On Sun, Mar 8, 2015 at 11:27 PM, Xunlei Pang <xlpang@126.com> wrote:
> From: Xunlei Pang <pang.xunlei@linaro.org>
>
> rtc_read_time() has already judged valid tm by rtc_valid_tm(),
> so just remove it.
>
> Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>

I've queued this patch, but the two prior patches in this series I left out.

thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
diff mbox

Patch

diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index 74a943e..c29ba7e 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -117,10 +117,6 @@  static int rtc_resume(struct device *dev)
 		return 0;
 	}
 
-	if (rtc_valid_tm(&tm) != 0) {
-		pr_debug("%s:  bogus resume time\n", dev_name(&rtc->dev));
-		return 0;
-	}
 	new_rtc.tv_sec = rtc_tm_to_time64(&tm);
 	new_rtc.tv_nsec = 0;