Skip to content

Commit eb4ffa4

Browse files
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent a012d43 commit eb4ffa4

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

drivers/rtc/rtc-amlogic-a4.c

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,8 @@ static int aml_rtc_read_time(struct device *dev, struct rtc_time *tm)
102102
u32 time_sec;
103103

104104
/* if RTC disabled, read time failed */
105-
if (!rtc->rtc_enabled) {
106-
dev_err(dev, "RTC disabled, read time failed\n");
105+
if (!rtc->rtc_enabled)
107106
return -EINVAL;
108-
}
109107

110108
regmap_read(rtc->map, RTC_REAL_TIME, &time_sec);
111109
if (rtc->config->gray_stored)
@@ -145,10 +143,8 @@ static int aml_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
145143
time64_t alarm_sec;
146144

147145
/* if RTC disabled, set alarm failed */
148-
if (!rtc->rtc_enabled) {
149-
dev_err(dev, "RTC disabled, set alarm failed\n");
146+
if (!rtc->rtc_enabled)
150147
return -EINVAL;
151-
}
152148

153149
regmap_update_bits(rtc->map, RTC_CTRL,
154150
RTC_ALRM0_EN, RTC_ALRM0_EN);
@@ -174,10 +170,8 @@ static int aml_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
174170
int alarm_mask;
175171

176172
/* if RTC disabled, read alarm failed */
177-
if (!rtc->rtc_enabled) {
178-
dev_err(dev, "RTC disabled, read alarm failed\n");
173+
if (!rtc->rtc_enabled)
179174
return -EINVAL;
180-
}
181175

182176
regmap_read(rtc->map, RTC_ALARM0_REG, &alarm_sec);
183177
if (rtc->config->gray_stored)
@@ -201,10 +195,8 @@ static int aml_rtc_read_offset(struct device *dev, long *offset)
201195
int sign, match_counter, enable;
202196

203197
/* if RTC disabled, read offset failed */
204-
if (!rtc->rtc_enabled) {
205-
dev_err(dev, "RTC disabled, read offset failed\n");
198+
if (!rtc->rtc_enabled)
206199
return -EINVAL;
207-
}
208200

209201
regmap_read(rtc->map, RTC_SEC_ADJUST_REG, &reg_val);
210202
enable = FIELD_GET(RTC_ADJ_VALID, reg_val);
@@ -231,10 +223,8 @@ static int aml_rtc_set_offset(struct device *dev, long offset)
231223
u32 reg_val;
232224

233225
/* if RTC disabled, set offset failed */
234-
if (!rtc->rtc_enabled) {
235-
dev_err(dev, "RTC disabled, set offset failed\n");
226+
if (!rtc->rtc_enabled)
236227
return -EINVAL;
237-
}
238228

239229
if (offset) {
240230
enable = 1;

0 commit comments

Comments
 (0)