Skip to content

Commit

Permalink
m68k: mvme: Remove overdue #warnings in RTC handling
Browse files Browse the repository at this point in the history
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 <geert@linux-m68k.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210907124511.2723414-1-geert@linux-m68k.org
  • Loading branch information
Geert Uytterhoeven committed Sep 13, 2021
1 parent b1a8985 commit a7b68ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion arch/m68k/mvme147/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ static int bcd2int (unsigned char b)

int mvme147_hwclk(int op, struct rtc_time *t)
{
#warning check me!
if (!op) {
m147_rtc->ctrl = RTC_READ;
t->tm_year = bcd2int (m147_rtc->bcd_year);
Expand All @@ -183,6 +182,9 @@ int mvme147_hwclk(int op, struct rtc_time *t)
m147_rtc->ctrl = 0;
if (t->tm_year < 70)
t->tm_year += 100;
} else {
/* FIXME Setting the time is not yet supported */
return -EOPNOTSUPP;
}
return 0;
}
4 changes: 3 additions & 1 deletion arch/m68k/mvme16x/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ int bcd2int (unsigned char b)

int mvme16x_hwclk(int op, struct rtc_time *t)
{
#warning check me!
if (!op) {
rtc->ctrl = RTC_READ;
t->tm_year = bcd2int (rtc->bcd_year);
Expand All @@ -448,6 +447,9 @@ int mvme16x_hwclk(int op, struct rtc_time *t)
rtc->ctrl = 0;
if (t->tm_year < 70)
t->tm_year += 100;
} else {
/* FIXME Setting the time is not yet supported */
return -EOPNOTSUPP;
}
return 0;
}

0 comments on commit a7b68ed

Please sign in to comment.