Commit 2a10e0b28b196051ae71829e5b989cba00513289

Authored by Adrian Bunk
Committed by Linus Torvalds
1 parent 28fd129827

[PATCH] move rtc_interrupt() prototype to rtc.h

This patch moves the rtc_interrupt() prototype to rtc.h and removes the
prototypes from C files.

It also renames static rtc_interrupt() functions in
arch/arm/mach-integrator/time.c and arch/sh64/kernel/time.c to avoid compile
problems.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Paul Gortmaker <p_gortmaker@yahoo.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 5 changed files with 10 additions and 9 deletions Side-by-side Diff

arch/arm/mach-integrator/time.c
... ... @@ -96,7 +96,8 @@
96 96 .set_alarm = rtc_set_alarm,
97 97 };
98 98  
99   -static irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  99 +static irqreturn_t arm_rtc_interrupt(int irq, void *dev_id,
  100 + struct pt_regs *regs)
100 101 {
101 102 writel(0, rtc_base + RTC_EOI);
102 103 return IRQ_HANDLED;
... ... @@ -124,7 +125,7 @@
124 125  
125 126 xtime.tv_sec = __raw_readl(rtc_base + RTC_DR);
126 127  
127   - ret = request_irq(dev->irq[0], rtc_interrupt, SA_INTERRUPT,
  128 + ret = request_irq(dev->irq[0], arm_rtc_interrupt, SA_INTERRUPT,
128 129 "rtc-pl030", dev);
129 130 if (ret)
130 131 goto map_out;
arch/i386/kernel/time_hpet.c
... ... @@ -259,8 +259,6 @@
259 259 #include <linux/mc146818rtc.h>
260 260 #include <linux/rtc.h>
261 261  
262   -extern irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
263   -
264 262 #define DEFAULT_RTC_INT_FREQ 64
265 263 #define RTC_NUM_INTS 1
266 264  
arch/sh64/kernel/time.c
... ... @@ -417,7 +417,7 @@
417 417 /*
418 418 ** Regardless the toolchain, force the compiler to use the
419 419 ** arbitrary register r3 as a clock tick counter.
420   - ** NOTE: r3 must be in accordance with rtc_interrupt()
  420 + ** NOTE: r3 must be in accordance with sh64_rtc_interrupt()
421 421 */
422 422 register unsigned long long __rtc_irq_flag __asm__ ("r3");
423 423  
... ... @@ -482,7 +482,8 @@
482 482 #endif
483 483 }
484 484  
485   -static irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  485 +static irqreturn_t sh64_rtc_interrupt(int irq, void *dev_id,
  486 + struct pt_regs *regs)
486 487 {
487 488 ctrl_outb(0, RCR1); /* Disable Carry Interrupts */
488 489 regs->regs[3] = 1; /* Using r3 */
... ... @@ -491,7 +492,7 @@
491 492 }
492 493  
493 494 static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL};
494   -static struct irqaction irq1 = { rtc_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "rtc", NULL, NULL};
  495 +static struct irqaction irq1 = { sh64_rtc_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "rtc", NULL, NULL};
495 496  
496 497 void __init time_init(void)
497 498 {
arch/x86_64/kernel/time.c
... ... @@ -1075,8 +1075,6 @@
1075 1075 */
1076 1076 #include <linux/rtc.h>
1077 1077  
1078   -extern irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
1079   -
1080 1078 #define DEFAULT_RTC_INT_FREQ 64
1081 1079 #define RTC_NUM_INTS 1
1082 1080  
... ... @@ -11,6 +11,8 @@
11 11 #ifndef _LINUX_RTC_H_
12 12 #define _LINUX_RTC_H_
13 13  
  14 +#include <linux/interrupt.h>
  15 +
14 16 /*
15 17 * The struct used to pass data via the following ioctl. Similar to the
16 18 * struct tm in <time.h>, but it needs to be here so that the kernel
... ... @@ -102,6 +104,7 @@
102 104 int rtc_unregister(rtc_task_t *task);
103 105 int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg);
104 106 void rtc_get_rtc_time(struct rtc_time *rtc_tm);
  107 +irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
105 108  
106 109 #endif /* __KERNEL__ */
107 110