[PATCH] rtc-cmos.c: Build fix

From: Carlos R . Mafra
Date: Tue May 06 2008 - 12:58:04 EST


The function hpet_rtc_interrupt(..) is to be used only if CONFIG_HPET_EMULATE_RTC
is defined (see arch/x86/kernel/hpet.c), so we define it to return 0 when
!CONFIG_HPET_EMULATE_RTC to avoid build failures.

This function will never be used anyways when !CONFIG_HPET_EMULATE_RTC because
it is inside a if(is_hpet_enabled()) which is never true when
!CONFIG_HPET_EMULATE_RTC.

Signed-off-by: Carlos R. Mafra <crmafra@xxxxxxxxxxxx>
---
drivers/char/rtc.c | 2 --
drivers/rtc/rtc-cmos.c | 5 ++++-
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index 5f80a9d..31d09ea 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -119,8 +119,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

/*
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index d060a06..12046bb 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 {
--
1.5.4.3


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/