[PATCH] Fix a compile warning in powermac/feature.c

Segher Boessenkool segher at kernel.crashing.org
Thu Aug 2 01:41:14 EST 2007


...by using the pci_get API instead of the deprecated old stuff.

Signed-off-by: Segher Boessenkool <segher at kernel.crashing.org>
---
 arch/powerpc/platforms/powermac/feature.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index f29705f..ba931be 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -826,13 +826,15 @@ core99_ata100_enable(struct device_node *node, long value)
 
 	if (value) {
 		if (pci_device_from_OF_node(node, &pbus, &pid) == 0)
-			pdev = pci_find_slot(pbus, pid);
+			pdev = pci_get_bus_and_slot(pbus, pid);
 		if (pdev == NULL)
 			return 0;
 		rc = pci_enable_device(pdev);
+		if (rc == 0)
+			pci_set_master(pdev);
+		pci_dev_put(pdev);
 		if (rc)
 			return rc;
-		pci_set_master(pdev);
 	}
 	return 0;
 }
-- 
1.5.2.1.144.gabc40-dirty




More information about the Linuxppc-dev mailing list