aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_stub.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-11-28 13:43:47 +1000
committerDave Airlie <airlied@linux.ie>2008-12-29 17:47:21 +1000
commite7f7ab45ebcb54fd5f814ea15ea079e079662f67 (patch)
tree53e8206501c0b7a00831ea084b52664f7899d1c0 /drivers/gpu/drm/drm_stub.c
parent4a6908a3a050aacc9c3a2f36b276b46c0629ad91 (diff)
drm: cleanup exit path for module unload
The current sub-module unload exit path is a mess, it tries to abuse the idr. Just keep a list of devices per driver struct and free them in-order on rmmod. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_stub.c')
-rw-r--r--drivers/gpu/drm/drm_stub.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 66c96ec6667..849c0a9fe7f 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -270,6 +270,8 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
if ((ret = drm_get_minor(dev, &dev->primary, DRM_MINOR_LEGACY)))
goto err_g2;
+ list_add_tail(&dev->driver_item, &driver->device_list);
+
DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n",
driver->name, driver->major, driver->minor, driver->patchlevel,
driver->date, dev->primary->index);