diff options
| author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2024-11-12 15:36:52 +0100 |
|---|---|---|
| committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2024-11-12 17:43:21 +0100 |
| commit | eb4ffa40010472dffdc276da307161545aab45a3 (patch) | |
| tree | 71dd488155db4013a0add87ec339d2557a00921b /drivers/rtc | |
| parent | a012d430a4f29bf76810b019b5d34cb88b29e7eb (diff) | |
| download | tip-eb4ffa40010472dffdc276da307161545aab45a3.tar.gz | |
rtc: amlogic-a4: drop error messages
Drop error message because there is a high probability they will never be
seen and the final user action is clear, the time has to be set again.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20241112143652.3445648-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
| -rw-r--r-- | drivers/rtc/rtc-amlogic-a4.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/rtc/rtc-amlogic-a4.c b/drivers/rtc/rtc-amlogic-a4.c index 9423dce4193d68..4960790c4b243b 100644 --- a/drivers/rtc/rtc-amlogic-a4.c +++ b/drivers/rtc/rtc-amlogic-a4.c @@ -102,10 +102,8 @@ static int aml_rtc_read_time(struct device *dev, struct rtc_time *tm) u32 time_sec; /* if RTC disabled, read time failed */ - if (!rtc->rtc_enabled) { - dev_err(dev, "RTC disabled, read time failed\n"); + if (!rtc->rtc_enabled) return -EINVAL; - } regmap_read(rtc->map, RTC_REAL_TIME, &time_sec); if (rtc->config->gray_stored) @@ -145,10 +143,8 @@ static int aml_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) time64_t alarm_sec; /* if RTC disabled, set alarm failed */ - if (!rtc->rtc_enabled) { - dev_err(dev, "RTC disabled, set alarm failed\n"); + if (!rtc->rtc_enabled) return -EINVAL; - } regmap_update_bits(rtc->map, RTC_CTRL, RTC_ALRM0_EN, RTC_ALRM0_EN); @@ -174,10 +170,8 @@ static int aml_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm) int alarm_mask; /* if RTC disabled, read alarm failed */ - if (!rtc->rtc_enabled) { - dev_err(dev, "RTC disabled, read alarm failed\n"); + if (!rtc->rtc_enabled) return -EINVAL; - } regmap_read(rtc->map, RTC_ALARM0_REG, &alarm_sec); if (rtc->config->gray_stored) @@ -201,10 +195,8 @@ static int aml_rtc_read_offset(struct device *dev, long *offset) int sign, match_counter, enable; /* if RTC disabled, read offset failed */ - if (!rtc->rtc_enabled) { - dev_err(dev, "RTC disabled, read offset failed\n"); + if (!rtc->rtc_enabled) return -EINVAL; - } regmap_read(rtc->map, RTC_SEC_ADJUST_REG, ®_val); enable = FIELD_GET(RTC_ADJ_VALID, reg_val); @@ -231,10 +223,8 @@ static int aml_rtc_set_offset(struct device *dev, long offset) u32 reg_val; /* if RTC disabled, set offset failed */ - if (!rtc->rtc_enabled) { - dev_err(dev, "RTC disabled, set offset failed\n"); + if (!rtc->rtc_enabled) return -EINVAL; - } if (offset) { enable = 1; |
