Skip to content

Commit

Permalink
rtc: remove and clarify unneeded externs
Browse files Browse the repository at this point in the history
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 <crmafra@ift.unesp.br>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Carlos R. Mafra authored and Linus Torvalds committed Jul 24, 2008
1 parent 02bb584 commit c68d07b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions drivers/char/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
Expand Down
5 changes: 4 additions & 1 deletion drivers/rtc/rtc-cmos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c68d07b

Please sign in to comment.