drm: cleanup list initialisation
authorDave Airlie <airlied@linux.ie>
Wed, 11 Jul 2007 02:05:36 +0000 (12:05 +1000)
committerDave Airlie <airlied@linux.ie>
Wed, 11 Jul 2007 02:05:36 +0000 (12:05 +1000)
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/char/drm/drm_fops.c
drivers/char/drm/drm_stub.c

index e82e78fa42b07875c78802b1f29fc6a42af41f02..d4b4dce68ad2ce8e6ba2f736f054619b7a6e19cc 100644 (file)
@@ -79,9 +79,6 @@ static int drm_setup(drm_device_t * dev)
        drm_ht_create(&dev->magiclist, DRM_MAGIC_HASH_ORDER);
        INIT_LIST_HEAD(&dev->magicfree);
 
-       INIT_LIST_HEAD(&dev->ctxlist);
-       INIT_LIST_HEAD(&dev->vmalist);
-
        dev->sigdata.lock = NULL;
        init_waitqueue_head(&dev->lock.lock_queue);
        dev->queue_count = 0;
index 59a9e7e5f128b01f24ad37389d7f7dc663cd693b..331163001963560b57f09c37c099db9a5a7ce21a 100644 (file)
@@ -60,6 +60,10 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
        int retcode;
 
        INIT_LIST_HEAD(&dev->filelist);
+       INIT_LIST_HEAD(&dev->ctxlist);
+       INIT_LIST_HEAD(&dev->vmalist);
+       INIT_LIST_HEAD(&dev->maplist);
+
        spin_lock_init(&dev->count_lock);
        spin_lock_init(&dev->drw_lock);
        spin_lock_init(&dev->tasklet_lock);
@@ -81,8 +85,6 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
                return -ENOMEM;
        }
 
-       INIT_LIST_HEAD(&dev->maplist);
-
        /* the DRM has 6 basic counters */
        dev->counters = 6;
        dev->types[0] = _DRM_STAT_LOCK;