aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/mpic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/mpic.c')
-rw-r--r--arch/powerpc/sysdev/mpic.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 74c64c0d3b71..25a81f73cecf 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -271,7 +271,7 @@ static void _mpic_map_dcr(struct mpic *mpic, struct mpic_reg_bank *rb,
271{ 271{
272 rb->dbase = mpic->dcr_base; 272 rb->dbase = mpic->dcr_base;
273 rb->doff = offset; 273 rb->doff = offset;
274 rb->dhost = dcr_map(mpic->of_node, rb->dbase + rb->doff, size); 274 rb->dhost = dcr_map(mpic->irqhost->of_node, rb->dbase + rb->doff, size);
275 BUG_ON(!DCR_MAP_OK(rb->dhost)); 275 BUG_ON(!DCR_MAP_OK(rb->dhost));
276} 276}
277 277
@@ -861,10 +861,8 @@ static struct irq_chip mpic_irq_ht_chip = {
861 861
862static int mpic_host_match(struct irq_host *h, struct device_node *node) 862static int mpic_host_match(struct irq_host *h, struct device_node *node)
863{ 863{
864 struct mpic *mpic = h->host_data;
865
866 /* Exact match, unless mpic node is NULL */ 864 /* Exact match, unless mpic node is NULL */
867 return mpic->of_node == NULL || mpic->of_node == node; 865 return h->of_node == NULL || h->of_node == node;
868} 866}
869 867
870static int mpic_host_map(struct irq_host *h, unsigned int virq, 868static int mpic_host_map(struct irq_host *h, unsigned int virq,
@@ -985,10 +983,9 @@ struct mpic * __init mpic_alloc(struct device_node *node,
985 983
986 memset(mpic, 0, sizeof(struct mpic)); 984 memset(mpic, 0, sizeof(struct mpic));
987 mpic->name = name; 985 mpic->name = name;
988 mpic->of_node = of_node_get(node);
989 986
990 mpic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, isu_size, 987 mpic->irqhost = irq_alloc_host(of_node_get(node), IRQ_HOST_MAP_LINEAR,
991 &mpic_host_ops, 988 isu_size, &mpic_host_ops,
992 flags & MPIC_LARGE_VECTORS ? 2048 : 256); 989 flags & MPIC_LARGE_VECTORS ? 2048 : 256);
993 if (mpic->irqhost == NULL) { 990 if (mpic->irqhost == NULL) {
994 of_node_put(node); 991 of_node_put(node);