diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2008-08-05 19:10:00 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-08-20 02:34:57 -0400 |
commit | 611cd90c91494d1ff9bd4bc349fe38789828733e (patch) | |
tree | e37ba574b2f08f02e69e3de1d600f08b7e658288 /arch/powerpc/sysdev | |
parent | dcfcfe756762682d084f40b96c78507f0d27d379 (diff) |
powerpc: fsl_msi doesn't need it's own of_node
The FSL MSI code keeps a pointer to the of_node from the device
it represents. However it also has an irq_host, which contains
a pointer to the of_node, so use that one instead.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/fsl_msi.c | 12 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_msi.h | 3 |
2 files changed, 5 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 2c5187cc8a24..d49fa9904d53 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c | |||
@@ -108,7 +108,8 @@ static int fsl_msi_free_dt_hwirqs(struct fsl_msi *msi) | |||
108 | bitmap_allocate_region(msi->fsl_msi_bitmap, 0, | 108 | bitmap_allocate_region(msi->fsl_msi_bitmap, 0, |
109 | get_count_order(NR_MSI_IRQS)); | 109 | get_count_order(NR_MSI_IRQS)); |
110 | 110 | ||
111 | p = of_get_property(msi->of_node, "msi-available-ranges", &len); | 111 | p = of_get_property(msi->irqhost->of_node, "msi-available-ranges", |
112 | &len); | ||
112 | 113 | ||
113 | if (!p) { | 114 | if (!p) { |
114 | /* No msi-available-ranges property, | 115 | /* No msi-available-ranges property, |
@@ -120,7 +121,7 @@ static int fsl_msi_free_dt_hwirqs(struct fsl_msi *msi) | |||
120 | 121 | ||
121 | if ((len % (2 * sizeof(u32))) != 0) { | 122 | if ((len % (2 * sizeof(u32))) != 0) { |
122 | printk(KERN_WARNING "fsl_msi: Malformed msi-available-ranges " | 123 | printk(KERN_WARNING "fsl_msi: Malformed msi-available-ranges " |
123 | "property on %s\n", msi->of_node->full_name); | 124 | "property on %s\n", msi->irqhost->of_node->full_name); |
124 | return -EINVAL; | 125 | return -EINVAL; |
125 | } | 126 | } |
126 | 127 | ||
@@ -317,14 +318,11 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev, | |||
317 | goto error_out; | 318 | goto error_out; |
318 | } | 319 | } |
319 | 320 | ||
320 | msi->of_node = of_node_get(dev->node); | 321 | msi->irqhost = irq_alloc_host(dev->node, IRQ_HOST_MAP_LINEAR, |
322 | NR_MSI_IRQS, &fsl_msi_host_ops, 0); | ||
321 | 323 | ||
322 | msi->irqhost = irq_alloc_host(of_node_get(dev->node), | ||
323 | IRQ_HOST_MAP_LINEAR, | ||
324 | NR_MSI_IRQS, &fsl_msi_host_ops, 0); | ||
325 | if (msi->irqhost == NULL) { | 324 | if (msi->irqhost == NULL) { |
326 | dev_err(&dev->dev, "No memory for MSI irqhost\n"); | 325 | dev_err(&dev->dev, "No memory for MSI irqhost\n"); |
327 | of_node_put(dev->node); | ||
328 | err = -ENOMEM; | 326 | err = -ENOMEM; |
329 | goto error_out; | 327 | goto error_out; |
330 | } | 328 | } |
diff --git a/arch/powerpc/sysdev/fsl_msi.h b/arch/powerpc/sysdev/fsl_msi.h index a653468521fa..6574550c00a5 100644 --- a/arch/powerpc/sysdev/fsl_msi.h +++ b/arch/powerpc/sysdev/fsl_msi.h | |||
@@ -22,9 +22,6 @@ | |||
22 | #define FSL_PIC_IP_IPIC 0x00000002 | 22 | #define FSL_PIC_IP_IPIC 0x00000002 |
23 | 23 | ||
24 | struct fsl_msi { | 24 | struct fsl_msi { |
25 | /* Device node of the MSI interrupt*/ | ||
26 | struct device_node *of_node; | ||
27 | |||
28 | struct irq_host *irqhost; | 25 | struct irq_host *irqhost; |
29 | 26 | ||
30 | unsigned long cascade_irq; | 27 | unsigned long cascade_irq; |