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/ipic.c | |
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/ipic.c')
-rw-r--r-- | arch/powerpc/sysdev/ipic.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index 473c415e9e25..05a56e55804c 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c | |||
@@ -511,10 +511,8 @@ static struct irq_chip ipic_irq_chip = { | |||
511 | 511 | ||
512 | static int ipic_host_match(struct irq_host *h, struct device_node *node) | 512 | static int ipic_host_match(struct irq_host *h, struct device_node *node) |
513 | { | 513 | { |
514 | struct ipic *ipic = h->host_data; | ||
515 | |||
516 | /* Exact match, unless ipic node is NULL */ | 514 | /* Exact match, unless ipic node is NULL */ |
517 | return ipic->of_node == NULL || ipic->of_node == node; | 515 | return h->of_node == NULL || h->of_node == node; |
518 | } | 516 | } |
519 | 517 | ||
520 | static int ipic_host_map(struct irq_host *h, unsigned int virq, | 518 | static int ipic_host_map(struct irq_host *h, unsigned int virq, |
@@ -568,9 +566,8 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags) | |||
568 | return NULL; | 566 | return NULL; |
569 | 567 | ||
570 | memset(ipic, 0, sizeof(struct ipic)); | 568 | memset(ipic, 0, sizeof(struct ipic)); |
571 | ipic->of_node = of_node_get(node); | ||
572 | 569 | ||
573 | ipic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, | 570 | ipic->irqhost = irq_alloc_host(of_node_get(node), IRQ_HOST_MAP_LINEAR, |
574 | NR_IPIC_INTS, | 571 | NR_IPIC_INTS, |
575 | &ipic_host_ops, 0); | 572 | &ipic_host_ops, 0); |
576 | if (ipic->irqhost == NULL) { | 573 | if (ipic->irqhost == NULL) { |