diff --git a/drivers/net/wan/sdladrv.c b/drivers/net/wan/sdladrv.c --- a/drivers/net/wan/sdladrv.c +++ b/drivers/net/wan/sdladrv.c @@ -13,6 +13,8 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * ============================================================================ +* Mar 27, 2005 Jiri Slaby Obsolete pci_find_device changed to +* pci_get_device * Mar 20, 2001 Nenad Corbic Added the auto_pci_cfg filed, to support * the PCISLOT #0. * Apr 04, 2000 Nenad Corbic Fixed the auto memory detection code. @@ -2032,8 +2034,7 @@ static int find_s514_adapter(sdlahw_t* h slot_no = hw->S514_slot_no; - while ((pci_dev = pci_find_device(V3_VENDOR_ID, V3_DEVICE_ID, pci_dev)) - != NULL) { + while ((pci_dev = pci_get_device(V3_VENDOR_ID, V3_DEVICE_ID, pci_dev))) { pci_read_config_word(pci_dev, PCI_SUBSYS_VENDOR_WORD, &PCI_subsys_vendor); @@ -2066,6 +2067,7 @@ static int find_s514_adapter(sdlahw_t* h /* if no S514 adapter has been found, then exit */ if (!number_S514_cards) { printk(KERN_INFO "%s: Error, no S514 adapters found\n", modname); + pci_dev_put(pci_dev); return 0; } /* if more than one S514 card has been found, then the user must have */ /* defined a slot number so that the correct adapter is used */ @@ -2075,6 +2077,7 @@ static int find_s514_adapter(sdlahw_t* h "%s: Disable the Autodetect feature and supply\n" "%s: the PCISLOT numbers for each card.\n", modname,modname,modname,modname); + pci_dev_put(pci_dev); return 0; } /* if the user has specified a slot number and the S514 adapter has */ @@ -2083,6 +2086,7 @@ static int find_s514_adapter(sdlahw_t* h printk(KERN_INFO "%s: Error, S514 card not found in specified slot #%d\n", modname, slot_no); + pci_dev_put(pci_dev); return 0; } @@ -2245,8 +2249,7 @@ static int pci_probe(sdlahw_t *hw) slot_no = 0; - while ((pci_dev = pci_find_device(V3_VENDOR_ID, V3_DEVICE_ID, pci_dev)) - != NULL) { + while (pci_dev = pci_get_device(V3_VENDOR_ID, V3_DEVICE_ID, pci_dev)) { pci_read_config_word(pci_dev, PCI_SUBSYS_VENDOR_WORD, &PCI_subsys_vendor);