summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/drm_drv.c4
-rw-r--r--linux/drm_drv.h4
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;