powerpc: Fix irq_alloc_host() reference counting and callers

When I changed irq_alloc_host() to take an of_node
(52964f87c6: "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>
This commit is contained in:
Michael Ellerman
2008-05-26 12:12:32 +10:00
committed by Paul Mackerras
parent 2272a55f16
commit 19fc65b525
11 changed files with 15 additions and 24 deletions

View File

@@ -735,13 +735,11 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)
memset(ipic, 0, sizeof(struct ipic));
ipic->irqhost = irq_alloc_host(of_node_get(node), IRQ_HOST_MAP_LINEAR,
ipic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR,
NR_IPIC_INTS,
&ipic_host_ops, 0);
if (ipic->irqhost == NULL) {
of_node_put(node);
if (ipic->irqhost == NULL)
return NULL;
}
ipic->regs = ioremap(res.start, res.end - res.start + 1);