]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] Make sure to of_node_get() the result of pci_device_to_OF_node()
authorMichael Ellerman <michael@ellerman.id.au>
Mon, 17 Sep 2007 06:03:45 +0000 (16:03 +1000)
committerPaul Mackerras <paulus@samba.org>
Tue, 2 Oct 2007 23:11:29 +0000 (09:11 +1000)
pci_device_to_OF_node() returns the device node attached to a PCI device,
but doesn't actually grab a reference - we need to do it ourselves.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/cell/axon_msi.c

index 74407afddf4639ba6215489bf976f26504dc12a0..4bde8da11f446e8523f0dcad29227957f829a253 100644 (file)
@@ -125,7 +125,7 @@ static struct axon_msic *find_msi_translator(struct pci_dev *dev)
        const phandle *ph;
        struct axon_msic *msic = NULL;
 
-       dn = pci_device_to_OF_node(dev);
+       dn = of_node_get(pci_device_to_OF_node(dev));
        if (!dn) {
                dev_dbg(&dev->dev, "axon_msi: no pci_dn found\n");
                return NULL;
@@ -182,7 +182,7 @@ static int setup_msi_msg_address(struct pci_dev *dev, struct msi_msg *msg)
        int len;
        const u32 *prop;
 
-       dn = pci_device_to_OF_node(dev);
+       dn = of_node_get(pci_device_to_OF_node(dev));
        if (!dn) {
                dev_dbg(&dev->dev, "axon_msi: no pci_dn found\n");
                return -ENODEV;