summaryrefslogtreecommitdiff
path: root/include/drm
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 /include/drm
parent4a6908a3a050aacc9c3a2f36b276b46c0629ad91 (diff)
downloadlinux-3.10-e7f7ab45ebcb54fd5f814ea15ea079e079662f67.tar.gz
linux-3.10-e7f7ab45ebcb54fd5f814ea15ea079e079662f67.tar.bz2
linux-3.10-e7f7ab45ebcb54fd5f814ea15ea079e079662f67.zip
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 'include/drm')
-rw-r--r--include/drm/drmP.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index d5e8e5c8954..08b8539e7b3 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -737,6 +737,8 @@ struct drm_driver {
int num_ioctls;
struct file_operations fops;
struct pci_driver pci_driver;
+ /* List of devices hanging off this driver */
+ struct list_head device_list;
};
#define DRM_MINOR_UNASSIGNED 0
@@ -759,6 +761,7 @@ struct drm_minor {
* may contain multiple heads.
*/
struct drm_device {
+ struct list_head driver_item; /**< list of devices per driver */
char *unique; /**< Unique identifier: e.g., busid */
int unique_len; /**< Length of unique field */
char *devname; /**< For /proc/interrupts */