]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/drm/drm_stub.c
drm: cleanup use of Linux list handling macros
[linux-2.6-omap-h63xx.git] / drivers / char / drm / drm_stub.c
index 19408adcc7755c396f83839986013773eb0a48c9..59a9e7e5f128b01f24ad37389d7f7dc663cd693b 100644 (file)
@@ -59,6 +59,7 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
 {
        int retcode;
 
+       INIT_LIST_HEAD(&dev->filelist);
        spin_lock_init(&dev->count_lock);
        spin_lock_init(&dev->drw_lock);
        spin_lock_init(&dev->tasklet_lock);
@@ -76,15 +77,12 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
 #endif
        dev->irq = pdev->irq;
 
-       dev->maplist = drm_calloc(1, sizeof(*dev->maplist), DRM_MEM_MAPS);
-       if (dev->maplist == NULL)
-               return -ENOMEM;
-       INIT_LIST_HEAD(&dev->maplist->head);
        if (drm_ht_create(&dev->map_hash, 12)) {
-               drm_free(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS);
                return -ENOMEM;
        }
 
+       INIT_LIST_HEAD(&dev->maplist);
+
        /* the DRM has 6 basic counters */
        dev->counters = 6;
        dev->types[0] = _DRM_STAT_LOCK;