diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2007-09-17 02:03:45 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-10-02 19:11:29 -0400 |
commit | db220b234da9f183b127b9c3077c253b94756e35 (patch) | |
tree | 529f0fd2e643741f8e668a9f1a45fe847afd25f7 /arch | |
parent | a35e370cfd2ddfb5d2f0ceae376ffeda273b357c (diff) |
[POWERPC] Make sure to of_node_get() the result of pci_device_to_OF_node()
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/cell/axon_msi.c | 4 |
1 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 74407afddf46..4bde8da11f44 100644 --- a/arch/powerpc/platforms/cell/axon_msi.c +++ b/arch/powerpc/platforms/cell/axon_msi.c | |||
@@ -125,7 +125,7 @@ static struct axon_msic *find_msi_translator(struct pci_dev *dev) | |||
125 | const phandle *ph; | 125 | const phandle *ph; |
126 | struct axon_msic *msic = NULL; | 126 | struct axon_msic *msic = NULL; |
127 | 127 | ||
128 | dn = pci_device_to_OF_node(dev); | 128 | dn = of_node_get(pci_device_to_OF_node(dev)); |
129 | if (!dn) { | 129 | if (!dn) { |
130 | dev_dbg(&dev->dev, "axon_msi: no pci_dn found\n"); | 130 | dev_dbg(&dev->dev, "axon_msi: no pci_dn found\n"); |
131 | return NULL; | 131 | return NULL; |
@@ -182,7 +182,7 @@ static int setup_msi_msg_address(struct pci_dev *dev, struct msi_msg *msg) | |||
182 | int len; | 182 | int len; |
183 | const u32 *prop; | 183 | const u32 *prop; |
184 | 184 | ||
185 | dn = pci_device_to_OF_node(dev); | 185 | dn = of_node_get(pci_device_to_OF_node(dev)); |
186 | if (!dn) { | 186 | if (!dn) { |
187 | dev_dbg(&dev->dev, "axon_msi: no pci_dn found\n"); | 187 | dev_dbg(&dev->dev, "axon_msi: no pci_dn found\n"); |
188 | return -ENODEV; | 188 | return -ENODEV; |