diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-04-17 15:59:23 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-11-08 16:35:47 -0500 |
commit | 6549d537922da6a6893e9bc1be9c2b89db663719 (patch) | |
tree | 1e34fac1634b45a1a7543f6f9246544eef54dc1b /arch/m68k | |
parent | 0dde595be678c06e7de27c98f45403088f1b126a (diff) |
m68k/irq: Rename irq_node to irq_data
Make it more similar to the genirq version:
- Add an irq field
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/include/asm/irq.h | 9 | ||||
-rw-r--r-- | arch/m68k/kernel/ints.c | 21 |
2 files changed, 16 insertions, 14 deletions
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h index bfc521f35bdf..3cb037c36d10 100644 --- a/arch/m68k/include/asm/irq.h +++ b/arch/m68k/include/asm/irq.h | |||
@@ -75,10 +75,11 @@ struct pt_regs; | |||
75 | * This structure is used to chain together the ISRs for a particular | 75 | * This structure is used to chain together the ISRs for a particular |
76 | * interrupt source (if it supports chaining). | 76 | * interrupt source (if it supports chaining). |
77 | */ | 77 | */ |
78 | struct irq_node { | 78 | struct irq_data { |
79 | unsigned int irq; | ||
79 | irqreturn_t (*handler)(int, void *); | 80 | irqreturn_t (*handler)(int, void *); |
80 | void *dev_id; | 81 | void *dev_id; |
81 | struct irq_node *next; | 82 | struct irq_data *next; |
82 | unsigned long flags; | 83 | unsigned long flags; |
83 | const char *devname; | 84 | const char *devname; |
84 | }; | 85 | }; |
@@ -105,9 +106,9 @@ extern unsigned int m68k_irq_startup(unsigned int); | |||
105 | extern void m68k_irq_shutdown(unsigned int); | 106 | extern void m68k_irq_shutdown(unsigned int); |
106 | 107 | ||
107 | /* | 108 | /* |
108 | * This function returns a new struct irq_node | 109 | * This function returns a new struct irq_data |
109 | */ | 110 | */ |
110 | extern struct irq_node *new_irq_node(void); | 111 | extern struct irq_data *new_irq_node(void); |
111 | 112 | ||
112 | extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)); | 113 | extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)); |
113 | extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, | 114 | extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, |
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c index 9de8eb4eaefb..88779320d406 100644 --- a/arch/m68k/kernel/ints.c +++ b/arch/m68k/kernel/ints.c | |||
@@ -51,7 +51,7 @@ extern u32 user_irqhandler_fixup[]; | |||
51 | extern u16 user_irqvec_fixup[]; | 51 | extern u16 user_irqvec_fixup[]; |
52 | 52 | ||
53 | /* table for system interrupt handlers */ | 53 | /* table for system interrupt handlers */ |
54 | static struct irq_node *irq_list[NR_IRQS]; | 54 | static struct irq_data *irq_list[NR_IRQS]; |
55 | static struct irq_chip *irq_chip[NR_IRQS]; | 55 | static struct irq_chip *irq_chip[NR_IRQS]; |
56 | static int irq_depth[NR_IRQS]; | 56 | static int irq_depth[NR_IRQS]; |
57 | 57 | ||
@@ -70,7 +70,7 @@ static struct irq_chip user_irq_chip = { | |||
70 | }; | 70 | }; |
71 | 71 | ||
72 | #define NUM_IRQ_NODES 100 | 72 | #define NUM_IRQ_NODES 100 |
73 | static struct irq_node nodes[NUM_IRQ_NODES]; | 73 | static struct irq_data nodes[NUM_IRQ_NODES]; |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * void init_IRQ(void) | 76 | * void init_IRQ(void) |
@@ -160,9 +160,9 @@ void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq, | |||
160 | irq_chip[irq + i] = contr; | 160 | irq_chip[irq + i] = contr; |
161 | } | 161 | } |
162 | 162 | ||
163 | struct irq_node *new_irq_node(void) | 163 | struct irq_data *new_irq_node(void) |
164 | { | 164 | { |
165 | struct irq_node *node; | 165 | struct irq_data *node; |
166 | short i; | 166 | short i; |
167 | 167 | ||
168 | for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) { | 168 | for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) { |
@@ -176,10 +176,10 @@ struct irq_node *new_irq_node(void) | |||
176 | return NULL; | 176 | return NULL; |
177 | } | 177 | } |
178 | 178 | ||
179 | int setup_irq(unsigned int irq, struct irq_node *node) | 179 | int setup_irq(unsigned int irq, struct irq_data *node) |
180 | { | 180 | { |
181 | struct irq_chip *contr; | 181 | struct irq_chip *contr; |
182 | struct irq_node **prev; | 182 | struct irq_data **prev; |
183 | unsigned long flags; | 183 | unsigned long flags; |
184 | 184 | ||
185 | if (irq >= NR_IRQS || !(contr = irq_chip[irq])) { | 185 | if (irq >= NR_IRQS || !(contr = irq_chip[irq])) { |
@@ -219,13 +219,14 @@ int request_irq(unsigned int irq, | |||
219 | irq_handler_t handler, | 219 | irq_handler_t handler, |
220 | unsigned long flags, const char *devname, void *dev_id) | 220 | unsigned long flags, const char *devname, void *dev_id) |
221 | { | 221 | { |
222 | struct irq_node *node; | 222 | struct irq_data *node; |
223 | int res; | 223 | int res; |
224 | 224 | ||
225 | node = new_irq_node(); | 225 | node = new_irq_node(); |
226 | if (!node) | 226 | if (!node) |
227 | return -ENOMEM; | 227 | return -ENOMEM; |
228 | 228 | ||
229 | node->irq = irq; | ||
229 | node->handler = handler; | 230 | node->handler = handler; |
230 | node->flags = flags; | 231 | node->flags = flags; |
231 | node->dev_id = dev_id; | 232 | node->dev_id = dev_id; |
@@ -243,7 +244,7 @@ EXPORT_SYMBOL(request_irq); | |||
243 | void free_irq(unsigned int irq, void *dev_id) | 244 | void free_irq(unsigned int irq, void *dev_id) |
244 | { | 245 | { |
245 | struct irq_chip *contr; | 246 | struct irq_chip *contr; |
246 | struct irq_node **p, *node; | 247 | struct irq_data **p, *node; |
247 | unsigned long flags; | 248 | unsigned long flags; |
248 | 249 | ||
249 | if (irq >= NR_IRQS || !(contr = irq_chip[irq])) { | 250 | if (irq >= NR_IRQS || !(contr = irq_chip[irq])) { |
@@ -386,7 +387,7 @@ EXPORT_SYMBOL(irq_canonicalize); | |||
386 | 387 | ||
387 | asmlinkage void m68k_handle_int(unsigned int irq) | 388 | asmlinkage void m68k_handle_int(unsigned int irq) |
388 | { | 389 | { |
389 | struct irq_node *node; | 390 | struct irq_data *node; |
390 | kstat_cpu(0).irqs[irq]++; | 391 | kstat_cpu(0).irqs[irq]++; |
391 | node = irq_list[irq]; | 392 | node = irq_list[irq]; |
392 | do { | 393 | do { |
@@ -412,7 +413,7 @@ asmlinkage void handle_badint(struct pt_regs *regs) | |||
412 | int show_interrupts(struct seq_file *p, void *v) | 413 | int show_interrupts(struct seq_file *p, void *v) |
413 | { | 414 | { |
414 | struct irq_chip *contr; | 415 | struct irq_chip *contr; |
415 | struct irq_node *node; | 416 | struct irq_data *node; |
416 | int i = *(loff_t *) v; | 417 | int i = *(loff_t *) v; |
417 | 418 | ||
418 | /* autovector interrupts */ | 419 | /* autovector interrupts */ |