From: Segher Boessenkool Date: Wed, 1 Aug 2007 15:41:14 +0000 (+1000) Subject: [POWERPC] Fix a compile warning in powermac/feature.c X-Git-Tag: v2.6.23-rc2~1^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5628244059976009151d41c2798855290753d8d5;p=linux-2.6 [POWERPC] Fix a compile warning in powermac/feature.c ...by using the pci_get API instead of the deprecated old stuff. Signed-off-by: Segher Boessenkool Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index f29705f804..ba931be217 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; }