[PATCH 2.6.9-rc2-mm4 ide.c] [2/8] Patch to replace pci_find_device with pci_dev_present

From: Hanna Linder
Date: Wed Sep 29 2004 - 14:39:59 EST



As pci_find_device is going away it needs to be replaced. In this case the dev
returned from pci_find_device was not being used so pci_dev_present was the
appropriate replacement.

This has been compile and boot tested on a T22.

Hanna Linder
IBM Linux Technology Center

Signed-off-by: Hanna Linder <hannal@xxxxxxxxxx>

diff -Nrup linux-2.6.9-rc2-mm4cln/drivers/ide/ide.c linux-2.6.9-rc2-mm4patch/drivers/ide/ide.c
--- linux-2.6.9-rc2-mm4cln/drivers/ide/ide.c 2004-09-28 14:58:25.000000000 -0700
+++ linux-2.6.9-rc2-mm4patch/drivers/ide/ide.c 2004-09-29 11:29:53.592066584 -0700
@@ -335,11 +335,16 @@ static void __init init_ide_data (void)

int ide_system_bus_speed (void)
{
+ static struct pci_device_id pci_default[] = {
+ { PCI_DEVICE(PCI_ANY_ID, PCI_ANY_ID) },
+ { }
+ };
+
if (!system_bus_speed) {
if (idebus_parameter) {
/* user supplied value */
system_bus_speed = idebus_parameter;
- } else if (pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL) != NULL) {
+ } else if (pci_dev_present(pci_default)) {
/* safe default value for PCI */
system_bus_speed = 33;
} else {



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/