summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2002-10-03 22:49:31 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2002-10-03 22:49:31 -0700
commitc4e4d47d1523eeda0925c94643b193b96400d35a (patch)
treeef1c44c39c0457ca4865f057bb0ce7423040656b
parentecc518ac78fe31c619ab5c1fc29fa0584a91d995 (diff)
PCI: remove pcibios_find_device() from the 53c7,8xx.c SCSI driver
-rw-r--r--drivers/scsi/53c7,8xx.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/scsi/53c7,8xx.c b/drivers/scsi/53c7,8xx.c
index 692a551a8753..be1887f0da38 100644
--- a/drivers/scsi/53c7,8xx.c
+++ b/drivers/scsi/53c7,8xx.c
@@ -1533,8 +1533,7 @@ NCR53c7xx_detect(Scsi_Host_Template *tpnt){
int i;
int current_override;
int count; /* Number of boards detected */
- unsigned char pci_bus, pci_device_fn;
- static short pci_index=0; /* Device index to PCI BIOS calls */
+ struct pci_dev *pdev = NULL;
tpnt->proc_name = "ncr53c7xx";
@@ -1563,13 +1562,11 @@ NCR53c7xx_detect(Scsi_Host_Template *tpnt){
if (pci_present()) {
for (i = 0; i < NPCI_CHIP_IDS; ++i)
- for (pci_index = 0;
- !pcibios_find_device (PCI_VENDOR_ID_NCR,
- pci_chip_ids[i].pci_device_id, pci_index, &pci_bus,
- &pci_device_fn);
- ++pci_index)
+ while ((pdev = pci_find_device (PCI_VENDOR_ID_NCR,
+ pci_chip_ids[i].pci_device_id,
+ pdev)))
if (!ncr_pci_init (tpnt, BOARD_GENERIC, pci_chip_ids[i].chip,
- pci_bus, pci_device_fn, /* no options */ 0))
+ pdev->bus->number, pdev->devfn, /* no options */ 0))
++count;
}
return count;