Skip to content

Commit a7b68ed

Browse files
committed
m68k: mvme: Remove overdue #warnings in RTC handling
The warnings were introduced when converting the MVME147 and MVME16x RTC handling from gettod to hwclk. Replace the #warning by a comment, and return an error to inform the upper layer that writing to the RTC is not yet supported. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent b1a8985 commit a7b68ed

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

arch/m68k/mvme147/config.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ static int bcd2int (unsigned char b)
171171

172172
int mvme147_hwclk(int op, struct rtc_time *t)
173173
{
174-
#warning check me!
175174
if (!op) {
176175
m147_rtc->ctrl = RTC_READ;
177176
t->tm_year = bcd2int (m147_rtc->bcd_year);
@@ -183,6 +182,9 @@ int mvme147_hwclk(int op, struct rtc_time *t)
183182
m147_rtc->ctrl = 0;
184183
if (t->tm_year < 70)
185184
t->tm_year += 100;
185+
} else {
186+
/* FIXME Setting the time is not yet supported */
187+
return -EOPNOTSUPP;
186188
}
187189
return 0;
188190
}

arch/m68k/mvme16x/config.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,6 @@ int bcd2int (unsigned char b)
436436

437437
int mvme16x_hwclk(int op, struct rtc_time *t)
438438
{
439-
#warning check me!
440439
if (!op) {
441440
rtc->ctrl = RTC_READ;
442441
t->tm_year = bcd2int (rtc->bcd_year);
@@ -448,6 +447,9 @@ int mvme16x_hwclk(int op, struct rtc_time *t)
448447
rtc->ctrl = 0;
449448
if (t->tm_year < 70)
450449
t->tm_year += 100;
450+
} else {
451+
/* FIXME Setting the time is not yet supported */
452+
return -EOPNOTSUPP;
451453
}
452454
return 0;
453455
}

0 commit comments

Comments
 (0)