aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_bufs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/drm_bufs.c')
-rw-r--r--drivers/char/drm/drm_bufs.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c
index 3528453c8ece..8d17dbce56ed 100644
--- a/drivers/char/drm/drm_bufs.c
+++ b/drivers/char/drm/drm_bufs.c
@@ -49,10 +49,10 @@ unsigned long drm_get_resource_len(struct drm_device *dev, unsigned int resource
49 49
50EXPORT_SYMBOL(drm_get_resource_len); 50EXPORT_SYMBOL(drm_get_resource_len);
51 51
52static drm_map_list_t *drm_find_matching_map(struct drm_device *dev, 52static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
53 drm_local_map_t *map) 53 drm_local_map_t *map)
54{ 54{
55 drm_map_list_t *entry; 55 struct drm_map_list *entry;
56 list_for_each_entry(entry, &dev->maplist, head) { 56 list_for_each_entry(entry, &dev->maplist, head) {
57 if (entry->map && map->type == entry->map->type && 57 if (entry->map && map->type == entry->map->type &&
58 ((entry->map->offset == map->offset) || 58 ((entry->map->offset == map->offset) ||
@@ -103,10 +103,11 @@ static int drm_map_handle(struct drm_device *dev, drm_hash_item_t *hash,
103 */ 103 */
104static int drm_addmap_core(struct drm_device * dev, unsigned int offset, 104static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
105 unsigned int size, enum drm_map_type type, 105 unsigned int size, enum drm_map_type type,
106 enum drm_map_flags flags, drm_map_list_t ** maplist) 106 enum drm_map_flags flags,
107 struct drm_map_list ** maplist)
107{ 108{
108 struct drm_map *map; 109 struct drm_map *map;
109 drm_map_list_t *list; 110 struct drm_map_list *list;
110 drm_dma_handle_t *dmah; 111 drm_dma_handle_t *dmah;
111 unsigned long user_token; 112 unsigned long user_token;
112 int ret; 113 int ret;
@@ -212,7 +213,7 @@ static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
212 } 213 }
213 break; 214 break;
214 case _DRM_AGP: { 215 case _DRM_AGP: {
215 drm_agp_mem_t *entry; 216 struct drm_agp_mem *entry;
216 int valid = 0; 217 int valid = 0;
217 218
218 if (!drm_core_has_AGP(dev)) { 219 if (!drm_core_has_AGP(dev)) {
@@ -314,7 +315,7 @@ int drm_addmap(struct drm_device * dev, unsigned int offset,
314 unsigned int size, enum drm_map_type type, 315 unsigned int size, enum drm_map_type type,
315 enum drm_map_flags flags, drm_local_map_t ** map_ptr) 316 enum drm_map_flags flags, drm_local_map_t ** map_ptr)
316{ 317{
317 drm_map_list_t *list; 318 struct drm_map_list *list;
318 int rc; 319 int rc;
319 320
320 rc = drm_addmap_core(dev, offset, size, type, flags, &list); 321 rc = drm_addmap_core(dev, offset, size, type, flags, &list);
@@ -331,7 +332,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
331 struct drm_file *priv = filp->private_data; 332 struct drm_file *priv = filp->private_data;
332 struct drm_device *dev = priv->head->dev; 333 struct drm_device *dev = priv->head->dev;
333 struct drm_map map; 334 struct drm_map map;
334 drm_map_list_t *maplist; 335 struct drm_map_list *maplist;
335 struct drm_map __user *argp = (void __user *)arg; 336 struct drm_map __user *argp = (void __user *)arg;
336 int err; 337 int err;
337 338
@@ -378,7 +379,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
378 */ 379 */
379int drm_rmmap_locked(struct drm_device *dev, drm_local_map_t *map) 380int drm_rmmap_locked(struct drm_device *dev, drm_local_map_t *map)
380{ 381{
381 drm_map_list_t *r_list = NULL, *list_t; 382 struct drm_map_list *r_list = NULL, *list_t;
382 drm_dma_handle_t dmah; 383 drm_dma_handle_t dmah;
383 int found = 0; 384 int found = 0;
384 385
@@ -453,7 +454,7 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
453 struct drm_device *dev = priv->head->dev; 454 struct drm_device *dev = priv->head->dev;
454 struct drm_map request; 455 struct drm_map request;
455 drm_local_map_t *map = NULL; 456 drm_local_map_t *map = NULL;
456 drm_map_list_t *r_list; 457 struct drm_map_list *r_list;
457 int ret; 458 int ret;
458 459
459 if (copy_from_user(&request, (struct drm_map __user *) arg, sizeof(request))) { 460 if (copy_from_user(&request, (struct drm_map __user *) arg, sizeof(request))) {
@@ -554,7 +555,7 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request)
554{ 555{
555 struct drm_device_dma *dma = dev->dma; 556 struct drm_device_dma *dma = dev->dma;
556 struct drm_buf_entry *entry; 557 struct drm_buf_entry *entry;
557 drm_agp_mem_t *agp_entry; 558 struct drm_agp_mem *agp_entry;
558 struct drm_buf *buf; 559 struct drm_buf *buf;
559 unsigned long offset; 560 unsigned long offset;
560 unsigned long agp_offset; 561 unsigned long agp_offset;