From e4a2a9c04024972f21cdf0620f6faa6de157686d Mon Sep 17 00:00:00 2001 From: Jon Smirl Date: Fri, 24 Oct 2003 17:40:54 +0000 Subject: Switch pci enumeration call to work on both 2.4 and 2.6 pci_for_each_dev is not supported on 2.6 --- linux-core/drm_drv.c | 4 ++-- linux/drm_drv.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index 93686f08..e0c00f02 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -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; diff --git a/linux/drm_drv.h b/linux/drm_drv.h index 93686f08..e0c00f02 100644 --- a/linux/drm_drv.h +++ b/linux/drm_drv.h @@ -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; -- cgit v1.2.3