Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] i8295 cleanups.

o Move i8259 function declarations to include/asm-mips/i8259.h
o Make i8259.c functions static where possible.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Yoichi Yuasa and committed by
Ralf Baechle
d80c1c0b ec70f65e

+10 -16
+8 -6
arch/mips/kernel/i8259.c
··· 30 30 31 31 static int i8259A_auto_eoi = -1; 32 32 DEFINE_SPINLOCK(i8259A_lock); 33 - /* some platforms call this... */ 34 - void mask_and_ack_8259A(unsigned int); 33 + static void disable_8259A_irq(unsigned int irq); 34 + static void enable_8259A_irq(unsigned int irq); 35 + static void mask_and_ack_8259A(unsigned int irq); 36 + static void init_8259A(int auto_eoi); 35 37 36 38 static struct irq_chip i8259A_chip = { 37 39 .name = "XT-PIC", ··· 58 56 #define cached_master_mask (cached_irq_mask) 59 57 #define cached_slave_mask (cached_irq_mask >> 8) 60 58 61 - void disable_8259A_irq(unsigned int irq) 59 + static void disable_8259A_irq(unsigned int irq) 62 60 { 63 61 unsigned int mask; 64 62 unsigned long flags; ··· 74 72 spin_unlock_irqrestore(&i8259A_lock, flags); 75 73 } 76 74 77 - void enable_8259A_irq(unsigned int irq) 75 + static void enable_8259A_irq(unsigned int irq) 78 76 { 79 77 unsigned int mask; 80 78 unsigned long flags; ··· 144 142 * first, _then_ send the EOI, and the order of EOI 145 143 * to the two 8259s is important! 146 144 */ 147 - void mask_and_ack_8259A(unsigned int irq) 145 + static void mask_and_ack_8259A(unsigned int irq) 148 146 { 149 147 unsigned int irqmask; 150 148 unsigned long flags; ··· 258 256 259 257 device_initcall(i8259A_init_sysfs); 260 258 261 - void init_8259A(int auto_eoi) 259 + static void init_8259A(int auto_eoi) 262 260 { 263 261 unsigned long flags; 264 262
-7
include/asm-mips/hw_irq.h
··· 8 8 #ifndef __ASM_HW_IRQ_H 9 9 #define __ASM_HW_IRQ_H 10 10 11 - #include <linux/profile.h> 12 11 #include <asm/atomic.h> 13 - 14 - extern void disable_8259A_irq(unsigned int irq); 15 - extern void enable_8259A_irq(unsigned int irq); 16 - extern int i8259A_irq_pending(unsigned int irq); 17 - extern void make_8259A_irq(unsigned int irq); 18 - extern void init_8259A(int aeoi); 19 12 20 13 extern atomic_t irq_err_count; 21 14
+2 -3
include/asm-mips/i8259.h
··· 37 37 38 38 extern spinlock_t i8259A_lock; 39 39 40 - extern void init_8259A(int auto_eoi); 41 - extern void enable_8259A_irq(unsigned int irq); 42 - extern void disable_8259A_irq(unsigned int irq); 40 + extern int i8259A_irq_pending(unsigned int irq); 41 + extern void make_8259A_irq(unsigned int irq); 43 42 44 43 extern void init_i8259_irqs(void); 45 44