summaryrefslogtreecommitdiff
path: root/linux/drm_drv.h
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2003-10-24 17:40:54 +0000
committerJon Smirl <jonsmirl@yahoo.com>2003-10-24 17:40:54 +0000
commite4a2a9c04024972f21cdf0620f6faa6de157686d (patch)
tree56765da8a6f9f04cbed27c9537395c0eae24b35f /linux/drm_drv.h
parent451a1d3f69a8d19c24382ef2b483517e9ef2c9f6 (diff)
Switch pci enumeration call to work on both 2.4 and 2.6 pci_for_each_dev is
not supported on 2.6
Diffstat (limited to 'linux/drm_drv.h')
-rw-r--r--linux/drm_drv.h4
1 files changed, 2 insertions, 2 deletions
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;