Switch pci enumeration call to work on both 2.4 and 2.6 pci_for_each_dev is

not supported on 2.6
main
Jon Smirl 2003-10-24 17:40:54 +00:00
parent 451a1d3f69
commit e4a2a9c040
2 changed files with 4 additions and 4 deletions

View File

@ -633,7 +633,7 @@ static int DRM(probe)(struct pci_dev *pdev)
*/
static int __init drm_init( void )
{
struct pci_dev *pdev;
struct pci_dev *pdev = NULL;
DRM_DEBUG( "\n" );
@ -643,7 +643,7 @@ static int __init drm_init( void )
DRM(mem_init)();
pci_for_each_dev(pdev) {
while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
DRM(probe)(pdev);
}
return 0;

View File

@ -633,7 +633,7 @@ static int DRM(probe)(struct pci_dev *pdev)
*/
static int __init drm_init( void )
{
struct pci_dev *pdev;
struct pci_dev *pdev = NULL;
DRM_DEBUG( "\n" );
@ -643,7 +643,7 @@ static int __init drm_init( void )
DRM(mem_init)();
pci_for_each_dev(pdev) {
while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
DRM(probe)(pdev);
}
return 0;