diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-17 10:46:18 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-17 10:46:18 +0100 |
commit | 9dacc71ff31a008d1e689fc824d31f6696454f68 (patch) | |
tree | b792f9c30008e1ed469a73ead4339fdf8a50a5ce /drivers/gpu/drm/drm_drv.c | |
parent | 19f47c634ea8c5a10ff7bb1a08c52fd0f49bc54c (diff) | |
parent | 9bf1a2445f3c569098b8de7097ca324e65abecc2 (diff) |
Merge commit 'v2.6.28-rc5' into x86/cleanups
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 96f416afc3f..3ab1e9cc469 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -266,11 +266,19 @@ int drm_init(struct drm_driver *driver) for (i = 0; driver->pci_driver.id_table[i].vendor != 0; i++) { pid = (struct pci_device_id *)&driver->pci_driver.id_table[i]; + /* Loop around setting up a DRM device for each PCI device + * matching our ID and device class. If we had the internal + * function that pci_get_subsys and pci_get_class used, we'd + * be able to just pass pid in instead of doing a two-stage + * thing. + */ pdev = NULL; - /* pass back in pdev to account for multiple identical cards */ while ((pdev = pci_get_subsys(pid->vendor, pid->device, pid->subvendor, pid->subdevice, pdev)) != NULL) { + if ((pdev->class & pid->class_mask) != pid->class) + continue; + /* stealth mode requires a manual probe */ pci_dev_get(pdev); drm_get_dev(pdev, pid, driver); |