diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/drm/drmP.h | 12 | ||||
-rw-r--r-- | drivers/char/drm/drm_auth.c | 10 | ||||
-rw-r--r-- | drivers/char/drm/drm_drv.c | 4 | ||||
-rw-r--r-- | drivers/char/drm/drm_proc.c | 2 | ||||
-rw-r--r-- | drivers/char/drm/drm_vm.c | 6 |
5 files changed, 15 insertions, 19 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 83d7d14a6153..288952837006 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h | |||
@@ -274,22 +274,18 @@ typedef struct drm_ioctl_desc { | |||
274 | int flags; | 274 | int flags; |
275 | } drm_ioctl_desc_t; | 275 | } drm_ioctl_desc_t; |
276 | 276 | ||
277 | typedef struct drm_devstate { | 277 | struct drm_magic_entry { |
278 | pid_t owner; /**< X server pid holding x_lock */ | ||
279 | } drm_devstate_t; | ||
280 | |||
281 | typedef struct drm_magic_entry { | ||
282 | struct list_head head; | 278 | struct list_head head; |
283 | drm_hash_item_t hash_item; | 279 | drm_hash_item_t hash_item; |
284 | struct drm_file *priv; | 280 | struct drm_file *priv; |
285 | struct drm_magic_entry *next; | 281 | struct drm_magic_entry *next; |
286 | } drm_magic_entry_t; | 282 | }; |
287 | 283 | ||
288 | typedef struct drm_vma_entry { | 284 | struct drm_vma_entry { |
289 | struct list_head head; | 285 | struct list_head head; |
290 | struct vm_area_struct *vma; | 286 | struct vm_area_struct *vma; |
291 | pid_t pid; | 287 | pid_t pid; |
292 | } drm_vma_entry_t; | 288 | }; |
293 | 289 | ||
294 | /** | 290 | /** |
295 | * DMA buffer. | 291 | * DMA buffer. |
diff --git a/drivers/char/drm/drm_auth.c b/drivers/char/drm/drm_auth.c index 905b8bda700d..52c635485304 100644 --- a/drivers/char/drm/drm_auth.c +++ b/drivers/char/drm/drm_auth.c | |||
@@ -48,12 +48,12 @@ | |||
48 | static struct drm_file *drm_find_file(struct drm_device * dev, drm_magic_t magic) | 48 | 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 | drm_magic_entry_t *pt; | 51 | struct drm_magic_entry *pt; |
52 | drm_hash_item_t *hash; | 52 | drm_hash_item_t *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)) { |
56 | pt = drm_hash_entry(hash, drm_magic_entry_t, hash_item); | 56 | pt = drm_hash_entry(hash, struct drm_magic_entry, hash_item); |
57 | retval = pt->priv; | 57 | retval = pt->priv; |
58 | } | 58 | } |
59 | mutex_unlock(&dev->struct_mutex); | 59 | mutex_unlock(&dev->struct_mutex); |
@@ -74,7 +74,7 @@ static struct drm_file *drm_find_file(struct drm_device * dev, drm_magic_t magic | |||
74 | static int drm_add_magic(struct drm_device * dev, struct drm_file * priv, | 74 | static int drm_add_magic(struct drm_device * dev, struct drm_file * priv, |
75 | drm_magic_t magic) | 75 | drm_magic_t magic) |
76 | { | 76 | { |
77 | drm_magic_entry_t *entry; | 77 | struct drm_magic_entry *entry; |
78 | 78 | ||
79 | DRM_DEBUG("%d\n", magic); | 79 | DRM_DEBUG("%d\n", magic); |
80 | 80 | ||
@@ -104,7 +104,7 @@ static int drm_add_magic(struct drm_device * dev, struct drm_file * priv, | |||
104 | */ | 104 | */ |
105 | static int drm_remove_magic(struct drm_device * dev, drm_magic_t magic) | 105 | static int drm_remove_magic(struct drm_device * dev, drm_magic_t magic) |
106 | { | 106 | { |
107 | drm_magic_entry_t *pt; | 107 | struct drm_magic_entry *pt; |
108 | drm_hash_item_t *hash; | 108 | drm_hash_item_t *hash; |
109 | 109 | ||
110 | DRM_DEBUG("%d\n", magic); | 110 | DRM_DEBUG("%d\n", magic); |
@@ -114,7 +114,7 @@ static int drm_remove_magic(struct drm_device * dev, drm_magic_t magic) | |||
114 | mutex_unlock(&dev->struct_mutex); | 114 | mutex_unlock(&dev->struct_mutex); |
115 | return -EINVAL; | 115 | return -EINVAL; |
116 | } | 116 | } |
117 | pt = drm_hash_entry(hash, drm_magic_entry_t, hash_item); | 117 | pt = drm_hash_entry(hash, struct drm_magic_entry, hash_item); |
118 | drm_ht_remove_item(&dev->magiclist, hash); | 118 | drm_ht_remove_item(&dev->magiclist, hash); |
119 | list_del(&pt->head); | 119 | list_del(&pt->head); |
120 | mutex_unlock(&dev->struct_mutex); | 120 | mutex_unlock(&dev->struct_mutex); |
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c index 6c7aae6c5b67..56594fd373bf 100644 --- a/drivers/char/drm/drm_drv.c +++ b/drivers/char/drm/drm_drv.c | |||
@@ -131,9 +131,9 @@ static drm_ioctl_desc_t drm_ioctls[] = { | |||
131 | */ | 131 | */ |
132 | int drm_lastclose(struct drm_device * dev) | 132 | int drm_lastclose(struct drm_device * dev) |
133 | { | 133 | { |
134 | drm_magic_entry_t *pt, *next; | 134 | struct drm_magic_entry *pt, *next; |
135 | drm_map_list_t *r_list, *list_t; | 135 | drm_map_list_t *r_list, *list_t; |
136 | drm_vma_entry_t *vma, *vma_temp; | 136 | struct drm_vma_entry *vma, *vma_temp; |
137 | int i; | 137 | int i; |
138 | 138 | ||
139 | DRM_DEBUG("\n"); | 139 | DRM_DEBUG("\n"); |
diff --git a/drivers/char/drm/drm_proc.c b/drivers/char/drm/drm_proc.c index 383287449282..4e234a2134ad 100644 --- a/drivers/char/drm/drm_proc.c +++ b/drivers/char/drm/drm_proc.c | |||
@@ -478,7 +478,7 @@ static int drm__vma_info(char *buf, char **start, off_t offset, int request, | |||
478 | { | 478 | { |
479 | struct drm_device *dev = (struct drm_device *) data; | 479 | struct drm_device *dev = (struct drm_device *) data; |
480 | int len = 0; | 480 | int len = 0; |
481 | drm_vma_entry_t *pt; | 481 | struct drm_vma_entry *pt; |
482 | struct vm_area_struct *vma; | 482 | struct vm_area_struct *vma; |
483 | #if defined(__i386__) | 483 | #if defined(__i386__) |
484 | unsigned int pgprot; | 484 | unsigned int pgprot; |
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c index f90ef788eed0..25f3bd11212f 100644 --- a/drivers/char/drm/drm_vm.c +++ b/drivers/char/drm/drm_vm.c | |||
@@ -196,7 +196,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma) | |||
196 | { | 196 | { |
197 | struct drm_file *priv = vma->vm_file->private_data; | 197 | struct drm_file *priv = vma->vm_file->private_data; |
198 | struct drm_device *dev = priv->head->dev; | 198 | struct drm_device *dev = priv->head->dev; |
199 | drm_vma_entry_t *pt, *temp; | 199 | struct drm_vma_entry *pt, *temp; |
200 | struct drm_map *map; | 200 | struct drm_map *map; |
201 | drm_map_list_t *r_list; | 201 | drm_map_list_t *r_list; |
202 | int found_maps = 0; | 202 | int found_maps = 0; |
@@ -407,7 +407,7 @@ static void drm_vm_open_locked(struct vm_area_struct *vma) | |||
407 | { | 407 | { |
408 | struct drm_file *priv = vma->vm_file->private_data; | 408 | struct drm_file *priv = vma->vm_file->private_data; |
409 | struct drm_device *dev = priv->head->dev; | 409 | struct drm_device *dev = priv->head->dev; |
410 | drm_vma_entry_t *vma_entry; | 410 | struct drm_vma_entry *vma_entry; |
411 | 411 | ||
412 | DRM_DEBUG("0x%08lx,0x%08lx\n", | 412 | DRM_DEBUG("0x%08lx,0x%08lx\n", |
413 | vma->vm_start, vma->vm_end - vma->vm_start); | 413 | vma->vm_start, vma->vm_end - vma->vm_start); |
@@ -443,7 +443,7 @@ static void drm_vm_close(struct vm_area_struct *vma) | |||
443 | { | 443 | { |
444 | struct drm_file *priv = vma->vm_file->private_data; | 444 | struct drm_file *priv = vma->vm_file->private_data; |
445 | struct drm_device *dev = priv->head->dev; | 445 | struct drm_device *dev = priv->head->dev; |
446 | drm_vma_entry_t *pt, *temp; | 446 | struct drm_vma_entry *pt, *temp; |
447 | 447 | ||
448 | DRM_DEBUG("0x%08lx,0x%08lx\n", | 448 | DRM_DEBUG("0x%08lx,0x%08lx\n", |
449 | vma->vm_start, vma->vm_end - vma->vm_start); | 449 | vma->vm_start, vma->vm_end - vma->vm_start); |