diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2008-05-25 22:12:32 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-06-08 23:51:16 -0400 |
commit | 19fc65b5251dfd90312ae0142cc8650cd273e6a6 (patch) | |
tree | 2b61ab4405dce8bd17e76584821856ea3baabd88 /arch/powerpc/platforms | |
parent | 2272a55f16c998d916904bba018b0f40f430d744 (diff) |
powerpc: Fix irq_alloc_host() reference counting and callers
When I changed irq_alloc_host() to take an of_node
(52964f87c64e6c6ea671b5bf3030fb1494090a48: "Add an optional
device_node pointer to the irq_host"), I botched the reference
counting semantics.
Stephen pointed out that it's irq_alloc_host()'s business if
it needs to take an additional reference to the device_node,
the caller shouldn't need to care.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/cell/axon_msi.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spider-pic.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c index b43defb9918c..896548ba1ca1 100644 --- a/arch/powerpc/platforms/cell/axon_msi.c +++ b/arch/powerpc/platforms/cell/axon_msi.c | |||
@@ -365,7 +365,7 @@ static int axon_msi_probe(struct of_device *device, | |||
365 | goto out_free_fifo; | 365 | goto out_free_fifo; |
366 | } | 366 | } |
367 | 367 | ||
368 | msic->irq_host = irq_alloc_host(of_node_get(dn), IRQ_HOST_MAP_NOMAP, | 368 | msic->irq_host = irq_alloc_host(dn, IRQ_HOST_MAP_NOMAP, |
369 | NR_IRQS, &msic_host_ops, 0); | 369 | NR_IRQS, &msic_host_ops, 0); |
370 | if (!msic->irq_host) { | 370 | if (!msic->irq_host) { |
371 | printk(KERN_ERR "axon_msi: couldn't allocate irq_host for %s\n", | 371 | printk(KERN_ERR "axon_msi: couldn't allocate irq_host for %s\n", |
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c index 3f4b4aef756d..4e5655624ae8 100644 --- a/arch/powerpc/platforms/cell/spider-pic.c +++ b/arch/powerpc/platforms/cell/spider-pic.c | |||
@@ -300,7 +300,7 @@ static void __init spider_init_one(struct device_node *of_node, int chip, | |||
300 | panic("spider_pic: can't map registers !"); | 300 | panic("spider_pic: can't map registers !"); |
301 | 301 | ||
302 | /* Allocate a host */ | 302 | /* Allocate a host */ |
303 | pic->host = irq_alloc_host(of_node_get(of_node), IRQ_HOST_MAP_LINEAR, | 303 | pic->host = irq_alloc_host(of_node, IRQ_HOST_MAP_LINEAR, |
304 | SPIDER_SRC_COUNT, &spider_host_ops, | 304 | SPIDER_SRC_COUNT, &spider_host_ops, |
305 | SPIDER_IRQ_INVALID); | 305 | SPIDER_IRQ_INVALID); |
306 | if (pic->host == NULL) | 306 | if (pic->host == NULL) |