diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-02-05 00:42:06 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-02-05 00:42:06 +0000 |
commit | 5befc04ff3c80209566cd49eccce9887d456abc9 (patch) | |
tree | 38fde9c1dcb4ed0d603aa1a463aa09d3c8f60fff /arch/mips/lib | |
parent | eaf87404ebd5527937100fc4b9ba72035bab7847 (diff) |
Only complain for systems without RTC when RTC functions are called.
Diffstat (limited to 'arch/mips/lib')
-rw-r--r-- | arch/mips/lib/rtc-no.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/arch/mips/lib/rtc-no.c b/arch/mips/lib/rtc-no.c index 4da0e1303..17fc710b9 100644 --- a/arch/mips/lib/rtc-no.c +++ b/arch/mips/lib/rtc-no.c @@ -12,23 +12,20 @@ #include <linux/kernel.h> #include <linux/mc146818rtc.h> -static unsigned char no_rtc_read_data(unsigned long addr) +static unsigned int shouldnt_happen(void) { - panic("no_rtc_read_data called - shouldn't happen."); -} + static int called; -static void no_rtc_write_data(unsigned char data, unsigned long addr) -{ - panic("no_rtc_write_data called - shouldn't happen."); -} + if (!called) { + called = 1; + printk(KERN_DEBUG "RTC functions called - shouldn't happen"); + } -static int no_rtc_bcd_mode(void) -{ - panic("no_rtc_bcd_mode called - shouldn't happen."); + return 0; } struct rtc_ops no_rtc_ops = { - &no_rtc_read_data, - &no_rtc_write_data, - &no_rtc_bcd_mode + rtc_read_data: (void *) &shouldnt_happen, + rtc_write_data: (void *) &shouldnt_happen, + rtc_bcd_mode: (void *) &shouldnt_happen }; |