diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2007-08-28 04:47:54 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-09-13 11:33:20 -0400 |
commit | 52964f87c64e6c6ea671b5bf3030fb1494090a48 (patch) | |
tree | 2e20d81bc05b60b7108733daf5713ea640ad2477 /arch/powerpc/sysdev/qe_lib | |
parent | 0ae0b54565a8dcc2b98de694b998e765de15b713 (diff) |
[POWERPC] Add an optional device_node pointer to the irq_host
The majority of irq_host implementations (3 out of 4) are associated
with a device_node, and need to stash it somewhere. Rather than having
it somewhere different for each host, add an optional device_node pointer
to the irq_host structure.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev/qe_lib')
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/qe_ic.c | 7 | ||||
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/qe_ic.h | 3 |
2 files changed, 2 insertions, 8 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c index 4d1dcb45963d..55e6f394af82 100644 --- a/arch/powerpc/sysdev/qe_lib/qe_ic.c +++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c | |||
@@ -245,10 +245,8 @@ static struct irq_chip qe_ic_irq_chip = { | |||
245 | 245 | ||
246 | static int qe_ic_host_match(struct irq_host *h, struct device_node *node) | 246 | static int qe_ic_host_match(struct irq_host *h, struct device_node *node) |
247 | { | 247 | { |
248 | struct qe_ic *qe_ic = h->host_data; | ||
249 | |||
250 | /* Exact match, unless qe_ic node is NULL */ | 248 | /* Exact match, unless qe_ic node is NULL */ |
251 | return qe_ic->of_node == NULL || qe_ic->of_node == node; | 249 | return h->of_node == NULL || h->of_node == node; |
252 | } | 250 | } |
253 | 251 | ||
254 | static int qe_ic_host_map(struct irq_host *h, unsigned int virq, | 252 | static int qe_ic_host_map(struct irq_host *h, unsigned int virq, |
@@ -352,9 +350,8 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags) | |||
352 | return; | 350 | return; |
353 | 351 | ||
354 | memset(qe_ic, 0, sizeof(struct qe_ic)); | 352 | memset(qe_ic, 0, sizeof(struct qe_ic)); |
355 | qe_ic->of_node = of_node_get(node); | ||
356 | 353 | ||
357 | qe_ic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, | 354 | qe_ic->irqhost = irq_alloc_host(of_node_get(node), IRQ_HOST_MAP_LINEAR, |
358 | NR_QE_IC_INTS, &qe_ic_host_ops, 0); | 355 | NR_QE_IC_INTS, &qe_ic_host_ops, 0); |
359 | if (qe_ic->irqhost == NULL) { | 356 | if (qe_ic->irqhost == NULL) { |
360 | of_node_put(node); | 357 | of_node_put(node); |
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.h b/arch/powerpc/sysdev/qe_lib/qe_ic.h index 9a631adb189d..c1361d005a8a 100644 --- a/arch/powerpc/sysdev/qe_lib/qe_ic.h +++ b/arch/powerpc/sysdev/qe_lib/qe_ic.h | |||
@@ -84,9 +84,6 @@ struct qe_ic { | |||
84 | /* The "linux" controller struct */ | 84 | /* The "linux" controller struct */ |
85 | struct irq_chip hc_irq; | 85 | struct irq_chip hc_irq; |
86 | 86 | ||
87 | /* The device node of the interrupt controller */ | ||
88 | struct device_node *of_node; | ||
89 | |||
90 | /* VIRQ numbers of QE high/low irqs */ | 87 | /* VIRQ numbers of QE high/low irqs */ |
91 | unsigned int virq_high; | 88 | unsigned int virq_high; |
92 | unsigned int virq_low; | 89 | unsigned int virq_low; |