diff options
author | Dave Airlie <airlied@linux.ie> | 2007-05-25 15:01:51 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-07-10 21:58:02 -0400 |
commit | bd1b331fae2813d9f03ceee649296f02edc0b893 (patch) | |
tree | 6139f72ebae88c332c754745f3d98cbe794ae4de /drivers/char/drm/drm_stub.c | |
parent | 4eb6bf6bfb580afaf1e1a1d30cba17a078530cf4 (diff) |
drm: cleanup use of Linux list handling macros
This makes the drms use of the list handling macros a lot cleaner
and more along the lines of how they should be used and uses them
in some more places.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_stub.c')
-rw-r--r-- | drivers/char/drm/drm_stub.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c index 19408adcc775..59a9e7e5f128 100644 --- a/drivers/char/drm/drm_stub.c +++ b/drivers/char/drm/drm_stub.c | |||
@@ -59,6 +59,7 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, | |||
59 | { | 59 | { |
60 | int retcode; | 60 | int retcode; |
61 | 61 | ||
62 | INIT_LIST_HEAD(&dev->filelist); | ||
62 | spin_lock_init(&dev->count_lock); | 63 | spin_lock_init(&dev->count_lock); |
63 | spin_lock_init(&dev->drw_lock); | 64 | spin_lock_init(&dev->drw_lock); |
64 | spin_lock_init(&dev->tasklet_lock); | 65 | spin_lock_init(&dev->tasklet_lock); |
@@ -76,15 +77,12 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, | |||
76 | #endif | 77 | #endif |
77 | dev->irq = pdev->irq; | 78 | dev->irq = pdev->irq; |
78 | 79 | ||
79 | dev->maplist = drm_calloc(1, sizeof(*dev->maplist), DRM_MEM_MAPS); | ||
80 | if (dev->maplist == NULL) | ||
81 | return -ENOMEM; | ||
82 | INIT_LIST_HEAD(&dev->maplist->head); | ||
83 | if (drm_ht_create(&dev->map_hash, 12)) { | 80 | if (drm_ht_create(&dev->map_hash, 12)) { |
84 | drm_free(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS); | ||
85 | return -ENOMEM; | 81 | return -ENOMEM; |
86 | } | 82 | } |
87 | 83 | ||
84 | INIT_LIST_HEAD(&dev->maplist); | ||
85 | |||
88 | /* the DRM has 6 basic counters */ | 86 | /* the DRM has 6 basic counters */ |
89 | dev->counters = 6; | 87 | dev->counters = 6; |
90 | dev->types[0] = _DRM_STAT_LOCK; | 88 | dev->types[0] = _DRM_STAT_LOCK; |