summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2004-09-10 16:44:28 +0000
committerJon Smirl <jonsmirl@yahoo.com>2004-09-10 16:44:28 +0000
commite6d468ad7f398a72e8be227564f3a450de873cc6 (patch)
tree214046d093e641f91bfc8d962d7f9c303382488f /linux-core
parent1fb27632c3338ff974c27fd88e2098a5193bb145 (diff)
More general patch to mark resources in use by all DRM drivers. Makes the
code Linux specific.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_drv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 12d2a532..09e50382 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -464,8 +464,10 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return -ENODEV;
dev = &(DRM(device)[DRM(numdevs)]);
- if (DRM(fb_loaded)==0)
+ if (DRM(fb_loaded)==0) {
pci_set_drvdata(pdev, dev);
+ pci_request_regions(pdev, DRIVER_NAME);
+ }
memset( (void *)dev, 0, sizeof(*dev) );
dev->count_lock = SPIN_LOCK_UNLOCKED;
@@ -568,6 +570,7 @@ static void __exit drm_cleanup_pci(struct pci_dev *pdev)
pci_set_drvdata(pdev, NULL);
drm_cleanup(dev);
+ pci_release_regions(pdev);
}
static struct pci_driver drm_driver = {