projects/linux·commit c68d07b2

rtc: remove and clarify unneeded externs

c68d07b2 · Carlos R. Mafra <[email protected]> · 2008-07-23 21:30:40 -07:00

When CONFIG_HPET_EMULATE_RTC is defined the external declaration of
hpet_rtc_interrupt is redundant due to the inclusion of hpet.h.

When !CONFIG_HPET_EMULATE_RTC we make it clear that hpet_rtc_interrupt is
not used by defining it to return zero.

Signed-off-by: Carlos R. Mafra <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
c68d07b2da54c941bb36c9d6d35fe8f263ee10ef
Parents
02bb584f

Changes

2 files changed · +4 −3

FileStatusAddDelContent
drivers/char/rtc.cmodified+0−2View file
drivers/rtc/rtc-cmos.cmodified+4−1View file

drivers/char/rtc.c

View file
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index d1569a0..dbefbb3 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -121,8 +121,6 @@ static irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
return 0;
}
#endif
-#else
-extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id);
#endif
/*

drivers/rtc/rtc-cmos.c

View file
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index d7bb9ba..94b89a2 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -52,7 +52,10 @@
#define hpet_rtc_timer_init() do { } while (0)
#define hpet_register_irq_handler(h) 0
#define hpet_unregister_irq_handler(h) do { } while (0)
-extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id);
+static irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
+{
+ return 0;
+}
#endif
struct cmos_rtc {