aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-07-11 20:26:44 -0400
committerDave Airlie <airlied@linux.ie>2007-07-11 20:26:44 -0400
commite0be428e6645f2891fab6be92d1b0e9aad972e7d (patch)
treecf071bb45d7f043da0ed28bde707daa3a6dce4f5 /drivers
parent9698b4dba42eb758ad98012c21e5fbdb372fe2d9 (diff)
drm: detypedef the hashtab and more of sman
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/drm/drmP.h8
-rw-r--r--drivers/char/drm/drm_auth.c4
-rw-r--r--drivers/char/drm/drm_bufs.c2
-rw-r--r--drivers/char/drm/drm_hashtab.c34
-rw-r--r--drivers/char/drm/drm_hashtab.h24
-rw-r--r--drivers/char/drm/drm_sman.c36
-rw-r--r--drivers/char/drm/drm_sman.h6
-rw-r--r--drivers/char/drm/drm_vm.c4
8 files changed, 59 insertions, 59 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
index c24a25606c18..1277693e9ca4 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -276,7 +276,7 @@ typedef struct drm_ioctl_desc {
276 276
277struct drm_magic_entry { 277struct drm_magic_entry {
278 struct list_head head; 278 struct list_head head;
279 drm_hash_item_t hash_item; 279 struct drm_hash_item hash_item;
280 struct drm_file *priv; 280 struct drm_file *priv;
281 struct drm_magic_entry *next; 281 struct drm_magic_entry *next;
282}; 282};
@@ -481,7 +481,7 @@ struct drm_sigdata {
481 */ 481 */
482struct drm_map_list { 482struct drm_map_list {
483 struct list_head head; /**< list head */ 483 struct list_head head; /**< list head */
484 drm_hash_item_t hash; 484 struct drm_hash_item hash;
485 struct drm_map *map; /**< mapping */ 485 struct drm_map *map; /**< mapping */
486 unsigned int user_token; 486 unsigned int user_token;
487}; 487};
@@ -660,7 +660,7 @@ struct drm_device {
660 /** \name Authentication */ 660 /** \name Authentication */
661 /*@{ */ 661 /*@{ */
662 struct list_head filelist; 662 struct list_head filelist;
663 drm_open_hash_t magiclist; /**< magic hash table */ 663 struct drm_open_hash magiclist; /**< magic hash table */
664 struct list_head magicfree; 664 struct list_head magicfree;
665 /*@} */ 665 /*@} */
666 666
@@ -668,7 +668,7 @@ struct drm_device {
668 /*@{ */ 668 /*@{ */
669 struct list_head maplist; /**< Linked list of regions */ 669 struct list_head maplist; /**< Linked list of regions */
670 int map_count; /**< Number of mappable regions */ 670 int map_count; /**< Number of mappable regions */
671 drm_open_hash_t map_hash; /**< User token hash table for maps */ 671 struct drm_open_hash map_hash; /**< User token hash table for maps */
672 672
673 /** \name Context handle management */ 673 /** \name Context handle management */
674 /*@{ */ 674 /*@{ */
diff --git a/drivers/char/drm/drm_auth.c b/drivers/char/drm/drm_auth.c
index 52c635485304..7f777da872cd 100644
--- a/drivers/char/drm/drm_auth.c
+++ b/drivers/char/drm/drm_auth.c
@@ -49,7 +49,7 @@ static struct drm_file *drm_find_file(struct drm_device * dev, drm_magic_t magic
49{ 49{
50 struct drm_file *retval = NULL; 50 struct drm_file *retval = NULL;
51 struct drm_magic_entry *pt; 51 struct drm_magic_entry *pt;
52 drm_hash_item_t *hash; 52 struct drm_hash_item *hash;
53 53
54 mutex_lock(&dev->struct_mutex); 54 mutex_lock(&dev->struct_mutex);
55 if (!drm_ht_find_item(&dev->magiclist, (unsigned long)magic, &hash)) { 55 if (!drm_ht_find_item(&dev->magiclist, (unsigned long)magic, &hash)) {
@@ -105,7 +105,7 @@ static int drm_add_magic(struct drm_device * dev, struct drm_file * priv,
105static int drm_remove_magic(struct drm_device * dev, drm_magic_t magic) 105static int drm_remove_magic(struct drm_device * dev, drm_magic_t magic)
106{ 106{
107 struct drm_magic_entry *pt; 107 struct drm_magic_entry *pt;
108 drm_hash_item_t *hash; 108 struct drm_hash_item *hash;
109 109
110 DRM_DEBUG("%d\n", magic); 110 DRM_DEBUG("%d\n", magic);
111 111
diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c
index 8d17dbce56ed..923174c54a1c 100644
--- a/drivers/char/drm/drm_bufs.c
+++ b/drivers/char/drm/drm_bufs.c
@@ -64,7 +64,7 @@ static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
64 return NULL; 64 return NULL;
65} 65}
66 66
67static int drm_map_handle(struct drm_device *dev, drm_hash_item_t *hash, 67static int drm_map_handle(struct drm_device *dev, struct drm_hash_item *hash,
68 unsigned long user_token, int hashed_handle) 68 unsigned long user_token, int hashed_handle)
69{ 69{
70 int use_hashed_handle; 70 int use_hashed_handle;
diff --git a/drivers/char/drm/drm_hashtab.c b/drivers/char/drm/drm_hashtab.c
index 31acb621dcce..3ad319070704 100644
--- a/drivers/char/drm/drm_hashtab.c
+++ b/drivers/char/drm/drm_hashtab.c
@@ -36,7 +36,7 @@
36#include "drm_hashtab.h" 36#include "drm_hashtab.h"
37#include <linux/hash.h> 37#include <linux/hash.h>
38 38
39int drm_ht_create(drm_open_hash_t *ht, unsigned int order) 39int drm_ht_create(struct drm_open_hash *ht, unsigned int order)
40{ 40{
41 unsigned int i; 41 unsigned int i;
42 42
@@ -63,9 +63,9 @@ int drm_ht_create(drm_open_hash_t *ht, unsigned int order)
63 return 0; 63 return 0;
64} 64}
65 65
66void drm_ht_verbose_list(drm_open_hash_t *ht, unsigned long key) 66void drm_ht_verbose_list(struct drm_open_hash *ht, unsigned long key)
67{ 67{
68 drm_hash_item_t *entry; 68 struct drm_hash_item *entry;
69 struct hlist_head *h_list; 69 struct hlist_head *h_list;
70 struct hlist_node *list; 70 struct hlist_node *list;
71 unsigned int hashed_key; 71 unsigned int hashed_key;
@@ -75,15 +75,15 @@ void drm_ht_verbose_list(drm_open_hash_t *ht, unsigned long key)
75 DRM_DEBUG("Key is 0x%08lx, Hashed key is 0x%08x\n", key, hashed_key); 75 DRM_DEBUG("Key is 0x%08lx, Hashed key is 0x%08x\n", key, hashed_key);
76 h_list = &ht->table[hashed_key]; 76 h_list = &ht->table[hashed_key];
77 hlist_for_each(list, h_list) { 77 hlist_for_each(list, h_list) {
78 entry = hlist_entry(list, drm_hash_item_t, head); 78 entry = hlist_entry(list, struct drm_hash_item, head);
79 DRM_DEBUG("count %d, key: 0x%08lx\n", count++, entry->key); 79 DRM_DEBUG("count %d, key: 0x%08lx\n", count++, entry->key);
80 } 80 }
81} 81}
82 82
83static struct hlist_node *drm_ht_find_key(drm_open_hash_t *ht, 83static struct hlist_node *drm_ht_find_key(struct drm_open_hash *ht,
84 unsigned long key) 84 unsigned long key)
85{ 85{
86 drm_hash_item_t *entry; 86 struct drm_hash_item *entry;
87 struct hlist_head *h_list; 87 struct hlist_head *h_list;
88 struct hlist_node *list; 88 struct hlist_node *list;
89 unsigned int hashed_key; 89 unsigned int hashed_key;
@@ -91,7 +91,7 @@ static struct hlist_node *drm_ht_find_key(drm_open_hash_t *ht,
91 hashed_key = hash_long(key, ht->order); 91 hashed_key = hash_long(key, ht->order);
92 h_list = &ht->table[hashed_key]; 92 h_list = &ht->table[hashed_key];
93 hlist_for_each(list, h_list) { 93 hlist_for_each(list, h_list) {
94 entry = hlist_entry(list, drm_hash_item_t, head); 94 entry = hlist_entry(list, struct drm_hash_item, head);
95 if (entry->key == key) 95 if (entry->key == key)
96 return list; 96 return list;
97 if (entry->key > key) 97 if (entry->key > key)
@@ -101,9 +101,9 @@ static struct hlist_node *drm_ht_find_key(drm_open_hash_t *ht,
101} 101}
102 102
103 103
104int drm_ht_insert_item(drm_open_hash_t *ht, drm_hash_item_t *item) 104int drm_ht_insert_item(struct drm_open_hash *ht, struct drm_hash_item *item)
105{ 105{
106 drm_hash_item_t *entry; 106 struct drm_hash_item *entry;
107 struct hlist_head *h_list; 107 struct hlist_head *h_list;
108 struct hlist_node *list, *parent; 108 struct hlist_node *list, *parent;
109 unsigned int hashed_key; 109 unsigned int hashed_key;
@@ -113,7 +113,7 @@ int drm_ht_insert_item(drm_open_hash_t *ht, drm_hash_item_t *item)
113 h_list = &ht->table[hashed_key]; 113 h_list = &ht->table[hashed_key];
114 parent = NULL; 114 parent = NULL;
115 hlist_for_each(list, h_list) { 115 hlist_for_each(list, h_list) {
116 entry = hlist_entry(list, drm_hash_item_t, head); 116 entry = hlist_entry(list, struct drm_hash_item, head);
117 if (entry->key == key) 117 if (entry->key == key)
118 return -EINVAL; 118 return -EINVAL;
119 if (entry->key > key) 119 if (entry->key > key)
@@ -132,7 +132,7 @@ int drm_ht_insert_item(drm_open_hash_t *ht, drm_hash_item_t *item)
132 * Just insert an item and return any "bits" bit key that hasn't been 132 * Just insert an item and return any "bits" bit key that hasn't been
133 * used before. 133 * used before.
134 */ 134 */
135int drm_ht_just_insert_please(drm_open_hash_t *ht, drm_hash_item_t *item, 135int drm_ht_just_insert_please(struct drm_open_hash *ht, struct drm_hash_item *item,
136 unsigned long seed, int bits, int shift, 136 unsigned long seed, int bits, int shift,
137 unsigned long add) 137 unsigned long add)
138{ 138{
@@ -156,8 +156,8 @@ int drm_ht_just_insert_please(drm_open_hash_t *ht, drm_hash_item_t *item,
156 return 0; 156 return 0;
157} 157}
158 158
159int drm_ht_find_item(drm_open_hash_t *ht, unsigned long key, 159int drm_ht_find_item(struct drm_open_hash *ht, unsigned long key,
160 drm_hash_item_t **item) 160 struct drm_hash_item **item)
161{ 161{
162 struct hlist_node *list; 162 struct hlist_node *list;
163 163
@@ -165,11 +165,11 @@ int drm_ht_find_item(drm_open_hash_t *ht, unsigned long key,
165 if (!list) 165 if (!list)
166 return -EINVAL; 166 return -EINVAL;
167 167
168 *item = hlist_entry(list, drm_hash_item_t, head); 168 *item = hlist_entry(list, struct drm_hash_item, head);
169 return 0; 169 return 0;
170} 170}
171 171
172int drm_ht_remove_key(drm_open_hash_t *ht, unsigned long key) 172int drm_ht_remove_key(struct drm_open_hash *ht, unsigned long key)
173{ 173{
174 struct hlist_node *list; 174 struct hlist_node *list;
175 175
@@ -182,14 +182,14 @@ int drm_ht_remove_key(drm_open_hash_t *ht, unsigned long key)
182 return -EINVAL; 182 return -EINVAL;
183} 183}
184 184
185int drm_ht_remove_item(drm_open_hash_t *ht, drm_hash_item_t *item) 185int drm_ht_remove_item(struct drm_open_hash *ht, struct drm_hash_item *item)
186{ 186{
187 hlist_del_init(&item->head); 187 hlist_del_init(&item->head);
188 ht->fill--; 188 ht->fill--;
189 return 0; 189 return 0;
190} 190}
191 191
192void drm_ht_remove(drm_open_hash_t *ht) 192void drm_ht_remove(struct drm_open_hash *ht)
193{ 193{
194 if (ht->table) { 194 if (ht->table) {
195 if (ht->use_vmalloc) 195 if (ht->use_vmalloc)
diff --git a/drivers/char/drm/drm_hashtab.h b/drivers/char/drm/drm_hashtab.h
index 613091c970af..0f1376774168 100644
--- a/drivers/char/drm/drm_hashtab.h
+++ b/drivers/char/drm/drm_hashtab.h
@@ -37,31 +37,31 @@
37 37
38#define drm_hash_entry(_ptr, _type, _member) container_of(_ptr, _type, _member) 38#define drm_hash_entry(_ptr, _type, _member) container_of(_ptr, _type, _member)
39 39
40typedef struct drm_hash_item{ 40struct drm_hash_item {
41 struct hlist_node head; 41 struct hlist_node head;
42 unsigned long key; 42 unsigned long key;
43} drm_hash_item_t; 43};
44 44
45typedef struct drm_open_hash{ 45struct drm_open_hash {
46 unsigned int size; 46 unsigned int size;
47 unsigned int order; 47 unsigned int order;
48 unsigned int fill; 48 unsigned int fill;
49 struct hlist_head *table; 49 struct hlist_head *table;
50 int use_vmalloc; 50 int use_vmalloc;
51} drm_open_hash_t; 51};
52 52
53 53
54extern int drm_ht_create(drm_open_hash_t *ht, unsigned int order); 54extern int drm_ht_create(struct drm_open_hash *ht, unsigned int order);
55extern int drm_ht_insert_item(drm_open_hash_t *ht, drm_hash_item_t *item); 55extern int drm_ht_insert_item(struct drm_open_hash *ht, struct drm_hash_item *item);
56extern int drm_ht_just_insert_please(drm_open_hash_t *ht, drm_hash_item_t *item, 56extern int drm_ht_just_insert_please(struct drm_open_hash *ht, struct drm_hash_item *item,
57 unsigned long seed, int bits, int shift, 57 unsigned long seed, int bits, int shift,
58 unsigned long add); 58 unsigned long add);
59extern int drm_ht_find_item(drm_open_hash_t *ht, unsigned long key, drm_hash_item_t **item); 59extern int drm_ht_find_item(struct drm_open_hash *ht, unsigned long key, struct drm_hash_item **item);
60 60
61extern void drm_ht_verbose_list(drm_open_hash_t *ht, unsigned long key); 61extern void drm_ht_verbose_list(struct drm_open_hash *ht, unsigned long key);
62extern int drm_ht_remove_key(drm_open_hash_t *ht, unsigned long key); 62extern int drm_ht_remove_key(struct drm_open_hash *ht, unsigned long key);
63extern int drm_ht_remove_item(drm_open_hash_t *ht, drm_hash_item_t *item); 63extern int drm_ht_remove_item(struct drm_open_hash *ht, struct drm_hash_item *item);
64extern void drm_ht_remove(drm_open_hash_t *ht); 64extern void drm_ht_remove(struct drm_open_hash *ht);
65 65
66 66
67#endif 67#endif
diff --git a/drivers/char/drm/drm_sman.c b/drivers/char/drm/drm_sman.c
index 5a075f070c6a..8421a93946d8 100644
--- a/drivers/char/drm/drm_sman.c
+++ b/drivers/char/drm/drm_sman.c
@@ -38,11 +38,11 @@
38 38
39#include "drm_sman.h" 39#include "drm_sman.h"
40 40
41typedef struct drm_owner_item { 41struct drm_owner_item {
42 drm_hash_item_t owner_hash; 42 struct drm_hash_item owner_hash;
43 struct list_head sman_list; 43 struct list_head sman_list;
44 struct list_head mem_blocks; 44 struct list_head mem_blocks;
45} drm_owner_item_t; 45};
46 46
47void drm_sman_takedown(struct drm_sman * sman) 47void drm_sman_takedown(struct drm_sman * sman)
48{ 48{
@@ -163,16 +163,16 @@ drm_sman_set_manager(struct drm_sman * sman, unsigned int manager,
163} 163}
164EXPORT_SYMBOL(drm_sman_set_manager); 164EXPORT_SYMBOL(drm_sman_set_manager);
165 165
166static drm_owner_item_t *drm_sman_get_owner_item(struct drm_sman * sman, 166static struct drm_owner_item *drm_sman_get_owner_item(struct drm_sman * sman,
167 unsigned long owner) 167 unsigned long owner)
168{ 168{
169 int ret; 169 int ret;
170 drm_hash_item_t *owner_hash_item; 170 struct drm_hash_item *owner_hash_item;
171 drm_owner_item_t *owner_item; 171 struct drm_owner_item *owner_item;
172 172
173 ret = drm_ht_find_item(&sman->owner_hash_tab, owner, &owner_hash_item); 173 ret = drm_ht_find_item(&sman->owner_hash_tab, owner, &owner_hash_item);
174 if (!ret) { 174 if (!ret) {
175 return drm_hash_entry(owner_hash_item, drm_owner_item_t, 175 return drm_hash_entry(owner_hash_item, struct drm_owner_item,
176 owner_hash); 176 owner_hash);
177 } 177 }
178 178
@@ -200,7 +200,7 @@ struct drm_memblock_item *drm_sman_alloc(struct drm_sman *sman, unsigned int man
200{ 200{
201 void *tmp; 201 void *tmp;
202 struct drm_sman_mm *sman_mm; 202 struct drm_sman_mm *sman_mm;
203 drm_owner_item_t *owner_item; 203 struct drm_owner_item *owner_item;
204 struct drm_memblock_item *memblock; 204 struct drm_memblock_item *memblock;
205 205
206 BUG_ON(manager >= sman->num_managers); 206 BUG_ON(manager >= sman->num_managers);
@@ -258,7 +258,7 @@ static void drm_sman_free(struct drm_memblock_item *item)
258 258
259int drm_sman_free_key(struct drm_sman *sman, unsigned int key) 259int drm_sman_free_key(struct drm_sman *sman, unsigned int key)
260{ 260{
261 drm_hash_item_t *hash_item; 261 struct drm_hash_item *hash_item;
262 struct drm_memblock_item *memblock_item; 262 struct drm_memblock_item *memblock_item;
263 263
264 if (drm_ht_find_item(&sman->user_hash_tab, key, &hash_item)) 264 if (drm_ht_find_item(&sman->user_hash_tab, key, &hash_item))
@@ -273,7 +273,7 @@ int drm_sman_free_key(struct drm_sman *sman, unsigned int key)
273EXPORT_SYMBOL(drm_sman_free_key); 273EXPORT_SYMBOL(drm_sman_free_key);
274 274
275static void drm_sman_remove_owner(struct drm_sman *sman, 275static void drm_sman_remove_owner(struct drm_sman *sman,
276 drm_owner_item_t *owner_item) 276 struct drm_owner_item *owner_item)
277{ 277{
278 list_del(&owner_item->sman_list); 278 list_del(&owner_item->sman_list);
279 drm_ht_remove_item(&sman->owner_hash_tab, &owner_item->owner_hash); 279 drm_ht_remove_item(&sman->owner_hash_tab, &owner_item->owner_hash);
@@ -283,14 +283,14 @@ static void drm_sman_remove_owner(struct drm_sman *sman,
283int drm_sman_owner_clean(struct drm_sman *sman, unsigned long owner) 283int drm_sman_owner_clean(struct drm_sman *sman, unsigned long owner)
284{ 284{
285 285
286 drm_hash_item_t *hash_item; 286 struct drm_hash_item *hash_item;
287 drm_owner_item_t *owner_item; 287 struct drm_owner_item *owner_item;
288 288
289 if (drm_ht_find_item(&sman->owner_hash_tab, owner, &hash_item)) { 289 if (drm_ht_find_item(&sman->owner_hash_tab, owner, &hash_item)) {
290 return -1; 290 return -1;
291 } 291 }
292 292
293 owner_item = drm_hash_entry(hash_item, drm_owner_item_t, owner_hash); 293 owner_item = drm_hash_entry(hash_item, struct drm_owner_item, owner_hash);
294 if (owner_item->mem_blocks.next == &owner_item->mem_blocks) { 294 if (owner_item->mem_blocks.next == &owner_item->mem_blocks) {
295 drm_sman_remove_owner(sman, owner_item); 295 drm_sman_remove_owner(sman, owner_item);
296 return -1; 296 return -1;
@@ -302,7 +302,7 @@ int drm_sman_owner_clean(struct drm_sman *sman, unsigned long owner)
302EXPORT_SYMBOL(drm_sman_owner_clean); 302EXPORT_SYMBOL(drm_sman_owner_clean);
303 303
304static void drm_sman_do_owner_cleanup(struct drm_sman *sman, 304static void drm_sman_do_owner_cleanup(struct drm_sman *sman,
305 drm_owner_item_t *owner_item) 305 struct drm_owner_item *owner_item)
306{ 306{
307 struct drm_memblock_item *entry, *next; 307 struct drm_memblock_item *entry, *next;
308 308
@@ -316,15 +316,15 @@ static void drm_sman_do_owner_cleanup(struct drm_sman *sman,
316void drm_sman_owner_cleanup(struct drm_sman *sman, unsigned long owner) 316void drm_sman_owner_cleanup(struct drm_sman *sman, unsigned long owner)
317{ 317{
318 318
319 drm_hash_item_t *hash_item; 319 struct drm_hash_item *hash_item;
320 drm_owner_item_t *owner_item; 320 struct drm_owner_item *owner_item;
321 321
322 if (drm_ht_find_item(&sman->owner_hash_tab, owner, &hash_item)) { 322 if (drm_ht_find_item(&sman->owner_hash_tab, owner, &hash_item)) {
323 323
324 return; 324 return;
325 } 325 }
326 326
327 owner_item = drm_hash_entry(hash_item, drm_owner_item_t, owner_hash); 327 owner_item = drm_hash_entry(hash_item, struct drm_owner_item, owner_hash);
328 drm_sman_do_owner_cleanup(sman, owner_item); 328 drm_sman_do_owner_cleanup(sman, owner_item);
329} 329}
330 330
@@ -332,7 +332,7 @@ EXPORT_SYMBOL(drm_sman_owner_cleanup);
332 332
333void drm_sman_cleanup(struct drm_sman *sman) 333void drm_sman_cleanup(struct drm_sman *sman)
334{ 334{
335 drm_owner_item_t *entry, *next; 335 struct drm_owner_item *entry, *next;
336 unsigned int i; 336 unsigned int i;
337 struct drm_sman_mm *sman_mm; 337 struct drm_sman_mm *sman_mm;
338 338
diff --git a/drivers/char/drm/drm_sman.h b/drivers/char/drm/drm_sman.h
index 2fef3b2bb613..39a39fefeef1 100644
--- a/drivers/char/drm/drm_sman.h
+++ b/drivers/char/drm/drm_sman.h
@@ -78,7 +78,7 @@ struct drm_sman_mm {
78 78
79struct drm_memblock_item { 79struct drm_memblock_item {
80 struct list_head owner_list; 80 struct list_head owner_list;
81 drm_hash_item_t user_hash; 81 struct drm_hash_item user_hash;
82 void *mm_info; 82 void *mm_info;
83 struct drm_sman_mm *mm; 83 struct drm_sman_mm *mm;
84 struct drm_sman *sman; 84 struct drm_sman *sman;
@@ -87,8 +87,8 @@ struct drm_memblock_item {
87struct drm_sman { 87struct drm_sman {
88 struct drm_sman_mm *mm; 88 struct drm_sman_mm *mm;
89 int num_managers; 89 int num_managers;
90 drm_open_hash_t owner_hash_tab; 90 struct drm_open_hash owner_hash_tab;
91 drm_open_hash_t user_hash_tab; 91 struct drm_open_hash user_hash_tab;
92 struct list_head owner_items; 92 struct list_head owner_items;
93}; 93};
94 94
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c
index 1c7a3c88702c..68e36e51ba0c 100644
--- a/drivers/char/drm/drm_vm.c
+++ b/drivers/char/drm/drm_vm.c
@@ -83,7 +83,7 @@ static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
83 struct drm_device *dev = priv->head->dev; 83 struct drm_device *dev = priv->head->dev;
84 struct drm_map *map = NULL; 84 struct drm_map *map = NULL;
85 struct drm_map_list *r_list; 85 struct drm_map_list *r_list;
86 drm_hash_item_t *hash; 86 struct drm_hash_item *hash;
87 87
88 /* 88 /*
89 * Find the right map 89 * Find the right map
@@ -549,7 +549,7 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
549 struct drm_device *dev = priv->head->dev; 549 struct drm_device *dev = priv->head->dev;
550 struct drm_map *map = NULL; 550 struct drm_map *map = NULL;
551 unsigned long offset = 0; 551 unsigned long offset = 0;
552 drm_hash_item_t *hash; 552 struct drm_hash_item *hash;
553 553
554 DRM_DEBUG("start = 0x%lx, end = 0x%lx, page offset = 0x%lx\n", 554 DRM_DEBUG("start = 0x%lx, end = 0x%lx, page offset = 0x%lx\n",
555 vma->vm_start, vma->vm_end, vma->vm_pgoff); 555 vma->vm_start, vma->vm_end, vma->vm_pgoff);