summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2008-05-26 12:12:30 +1000
committerPaul Mackerras <paulus@samba.org>2008-06-09 13:51:13 +1000
commit997526db9fa408058f23de19c0e12abd9207276b (patch)
treea4a49702904ed4824453ef049f780c1712b99e76 /arch/powerpc/platforms/cell
parent7c4f10b9003dc8423df07574ba197bbbe3bc382b (diff)
downloadblackbird-op-linux-997526db9fa408058f23de19c0e12abd9207276b.tar.gz
blackbird-op-linux-997526db9fa408058f23de19c0e12abd9207276b.zip
powerpc: Rework Axon MSI setup so we can avoid freeing the irq_host
If we do the call to irq_of_parse_and_map() first, then we don't need to worry about freeing the irq_host. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell')
-rw-r--r--arch/powerpc/platforms/cell/axon_msi.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
index 8b055bce27fe..b43defb9918c 100644
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -358,6 +358,13 @@ static int axon_msi_probe(struct of_device *device,
goto out_free_msic;
}
+ virq = irq_of_parse_and_map(dn, 0);
+ if (virq == NO_IRQ) {
+ printk(KERN_ERR "axon_msi: irq parse and map failed for %s\n",
+ dn->full_name);
+ goto out_free_fifo;
+ }
+
msic->irq_host = irq_alloc_host(of_node_get(dn), IRQ_HOST_MAP_NOMAP,
NR_IRQS, &msic_host_ops, 0);
if (!msic->irq_host) {
@@ -368,13 +375,6 @@ static int axon_msi_probe(struct of_device *device,
msic->irq_host->host_data = msic;
- virq = irq_of_parse_and_map(dn, 0);
- if (virq == NO_IRQ) {
- printk(KERN_ERR "axon_msi: irq parse and map failed for %s\n",
- dn->full_name);
- goto out_free_host;
- }
-
set_irq_data(virq, msic);
set_irq_chained_handler(virq, axon_msi_cascade);
pr_debug("axon_msi: irq 0x%x setup for axon_msi\n", virq);
@@ -399,8 +399,6 @@ static int axon_msi_probe(struct of_device *device,
return 0;
-out_free_host:
- kfree(msic->irq_host);
out_free_fifo:
dma_free_coherent(&device->dev, MSIC_FIFO_SIZE_BYTES, msic->fifo_virt,
msic->fifo_phys);
OpenPOWER on IntegriCloud