From 265c975b3fa2ec3c2f152cdc9a6476f3ee2130e7 Mon Sep 17 00:00:00 2001 From: Anson Huang Date: Thu, 8 Mar 2018 11:23:17 +0800 Subject: [PATCH] MLK-17730 rtc: rtc-imx-sc: only print once for read time error As RTC read time will be called periodically, to avoid too many error messages when RTC is NOT ready in SCFW, change the error print to only print once. Signed-off-by: Anson Huang Reviewed-by: Bai Ping --- drivers/rtc/rtc-imx-sc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-imx-sc.c b/drivers/rtc/rtc-imx-sc.c index 9f094094d256..909d7c2a7005 100644 --- a/drivers/rtc/rtc-imx-sc.c +++ b/drivers/rtc/rtc-imx-sc.c @@ -61,7 +61,7 @@ static int imx_sc_rtc_read_time(struct device *dev, struct rtc_time *tm) sciErr = sc_timer_get_rtc_sec1970(timer_ipcHandle, &time); if (sciErr) { - dev_err(dev, "failed to read time: %d\n", sciErr); + dev_err_once(dev, "failed to read time: %d\n", sciErr); return -EINVAL; }