]> git.baikalelectronics.ru Git - kernel.git/commitdiff
m68k: mvme: Remove overdue #warnings in RTC handling
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 7 Sep 2021 12:45:11 +0000 (14:45 +0200)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 13 Sep 2021 09:19:05 +0000 (11:19 +0200)
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
arch/m68k/mvme147/config.c
arch/m68k/mvme16x/config.c

index e1e90c49a49624ccf2cc81f427723de0c89dd28f..dfd6202fd403e92b208f5c8ba15c37be2912a298 100644 (file)
@@ -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);
@@ -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;
 }
index b59593c7cfb9dfbfd9073b18166bca1cdd5c0515..b4422c2dfbbf4f7c0a1131dd0dab5413e7cc50f0 100644 (file)
@@ -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);
@@ -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;
 }