[POWERPC] Fix a compile warning in powermac/feature.c
authorSegher Boessenkool <segher@kernel.crashing.org>
Wed, 1 Aug 2007 15:41:14 +0000 (01:41 +1000)
committerPaul Mackerras <paulus@samba.org>
Fri, 3 Aug 2007 09:36:01 +0000 (19:36 +1000)
...by using the pci_get API instead of the deprecated old stuff.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/powermac/feature.c

index f29705f8047de2be29b70e302be880ea694408fd..ba931be2175c89addaa3c488d465de37a29fca10 100644 (file)
@@ -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;
 }