diff options
author | Dave Airlie <airlied@linux.ie> | 2007-07-11 01:53:27 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-07-11 01:53:27 -0400 |
commit | 84b1fd103dbbe01b5905db1444d3fc8afa9a7207 (patch) | |
tree | 2088f4c8e68553e2d4f5d55fa7a714eb3fa09f9e /drivers/char/drm/drm_bufs.c | |
parent | c60ce623bd16137627009d05e311d877729f2ad6 (diff) |
drm: remove drm_file_t, drm_device_t and drm_head_t typedefs
some drivers still todo.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_bufs.c')
-rw-r--r-- | drivers/char/drm/drm_bufs.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c index 6678db2abd8e..d12e2876a2ab 100644 --- a/drivers/char/drm/drm_bufs.c +++ b/drivers/char/drm/drm_bufs.c | |||
@@ -36,20 +36,20 @@ | |||
36 | #include <linux/vmalloc.h> | 36 | #include <linux/vmalloc.h> |
37 | #include "drmP.h" | 37 | #include "drmP.h" |
38 | 38 | ||
39 | unsigned long drm_get_resource_start(drm_device_t *dev, unsigned int resource) | 39 | unsigned long drm_get_resource_start(struct drm_device *dev, unsigned int resource) |
40 | { | 40 | { |
41 | return pci_resource_start(dev->pdev, resource); | 41 | return pci_resource_start(dev->pdev, resource); |
42 | } | 42 | } |
43 | EXPORT_SYMBOL(drm_get_resource_start); | 43 | EXPORT_SYMBOL(drm_get_resource_start); |
44 | 44 | ||
45 | unsigned long drm_get_resource_len(drm_device_t *dev, unsigned int resource) | 45 | unsigned long drm_get_resource_len(struct drm_device *dev, unsigned int resource) |
46 | { | 46 | { |
47 | return pci_resource_len(dev->pdev, resource); | 47 | return pci_resource_len(dev->pdev, resource); |
48 | } | 48 | } |
49 | 49 | ||
50 | EXPORT_SYMBOL(drm_get_resource_len); | 50 | EXPORT_SYMBOL(drm_get_resource_len); |
51 | 51 | ||
52 | static drm_map_list_t *drm_find_matching_map(drm_device_t *dev, | 52 | static drm_map_list_t *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 | drm_map_list_t *entry; |
@@ -64,7 +64,7 @@ static drm_map_list_t *drm_find_matching_map(drm_device_t *dev, | |||
64 | return NULL; | 64 | return NULL; |
65 | } | 65 | } |
66 | 66 | ||
67 | static int drm_map_handle(drm_device_t *dev, drm_hash_item_t *hash, | 67 | static int drm_map_handle(struct drm_device *dev, drm_hash_item_t *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; |
@@ -101,7 +101,7 @@ static int drm_map_handle(drm_device_t *dev, drm_hash_item_t *hash, | |||
101 | * type. Adds the map to the map list drm_device::maplist. Adds MTRR's where | 101 | * type. Adds the map to the map list drm_device::maplist. Adds MTRR's where |
102 | * applicable and if supported by the kernel. | 102 | * applicable and if supported by the kernel. |
103 | */ | 103 | */ |
104 | static int drm_addmap_core(drm_device_t * dev, unsigned int offset, | 104 | static 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, drm_map_list_t ** maplist) |
107 | { | 107 | { |
@@ -310,7 +310,7 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset, | |||
310 | return 0; | 310 | return 0; |
311 | } | 311 | } |
312 | 312 | ||
313 | int drm_addmap(drm_device_t * dev, unsigned int offset, | 313 | int drm_addmap(struct drm_device * dev, unsigned int offset, |
314 | unsigned int size, enum drm_map_type type, | 314 | unsigned int size, enum drm_map_type type, |
315 | enum drm_map_flags flags, drm_local_map_t ** map_ptr) | 315 | enum drm_map_flags flags, drm_local_map_t ** map_ptr) |
316 | { | 316 | { |
@@ -328,8 +328,8 @@ EXPORT_SYMBOL(drm_addmap); | |||
328 | int drm_addmap_ioctl(struct inode *inode, struct file *filp, | 328 | int drm_addmap_ioctl(struct inode *inode, struct file *filp, |
329 | unsigned int cmd, unsigned long arg) | 329 | unsigned int cmd, unsigned long arg) |
330 | { | 330 | { |
331 | drm_file_t *priv = filp->private_data; | 331 | struct drm_file *priv = filp->private_data; |
332 | drm_device_t *dev = priv->head->dev; | 332 | struct drm_device *dev = priv->head->dev; |
333 | struct drm_map map; | 333 | struct drm_map map; |
334 | drm_map_list_t *maplist; | 334 | drm_map_list_t *maplist; |
335 | struct drm_map __user *argp = (void __user *)arg; | 335 | struct drm_map __user *argp = (void __user *)arg; |
@@ -376,7 +376,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp, | |||
376 | * | 376 | * |
377 | * \sa drm_addmap | 377 | * \sa drm_addmap |
378 | */ | 378 | */ |
379 | int drm_rmmap_locked(drm_device_t *dev, drm_local_map_t *map) | 379 | int drm_rmmap_locked(struct drm_device *dev, drm_local_map_t *map) |
380 | { | 380 | { |
381 | drm_map_list_t *r_list = NULL, *list_t; | 381 | drm_map_list_t *r_list = NULL, *list_t; |
382 | drm_dma_handle_t dmah; | 382 | drm_dma_handle_t dmah; |
@@ -426,7 +426,7 @@ int drm_rmmap_locked(drm_device_t *dev, drm_local_map_t *map) | |||
426 | return 0; | 426 | return 0; |
427 | } | 427 | } |
428 | 428 | ||
429 | int drm_rmmap(drm_device_t *dev, drm_local_map_t *map) | 429 | int drm_rmmap(struct drm_device *dev, drm_local_map_t *map) |
430 | { | 430 | { |
431 | int ret; | 431 | int ret; |
432 | 432 | ||
@@ -449,8 +449,8 @@ int drm_rmmap(drm_device_t *dev, drm_local_map_t *map) | |||
449 | int drm_rmmap_ioctl(struct inode *inode, struct file *filp, | 449 | int drm_rmmap_ioctl(struct inode *inode, struct file *filp, |
450 | unsigned int cmd, unsigned long arg) | 450 | unsigned int cmd, unsigned long arg) |
451 | { | 451 | { |
452 | drm_file_t *priv = filp->private_data; | 452 | struct drm_file *priv = filp->private_data; |
453 | drm_device_t *dev = priv->head->dev; | 453 | struct drm_device *dev = priv->head->dev; |
454 | struct drm_map request; | 454 | struct drm_map request; |
455 | drm_local_map_t *map = NULL; | 455 | drm_local_map_t *map = NULL; |
456 | drm_map_list_t *r_list; | 456 | drm_map_list_t *r_list; |
@@ -504,7 +504,7 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp, | |||
504 | * | 504 | * |
505 | * Frees any pages and buffers associated with the given entry. | 505 | * Frees any pages and buffers associated with the given entry. |
506 | */ | 506 | */ |
507 | static void drm_cleanup_buf_error(drm_device_t * dev, drm_buf_entry_t * entry) | 507 | static void drm_cleanup_buf_error(struct drm_device * dev, drm_buf_entry_t * entry) |
508 | { | 508 | { |
509 | int i; | 509 | int i; |
510 | 510 | ||
@@ -541,7 +541,7 @@ static void drm_cleanup_buf_error(drm_device_t * dev, drm_buf_entry_t * entry) | |||
541 | /** | 541 | /** |
542 | * Add AGP buffers for DMA transfers. | 542 | * Add AGP buffers for DMA transfers. |
543 | * | 543 | * |
544 | * \param dev drm_device_t to which the buffers are to be added. | 544 | * \param dev struct drm_device to which the buffers are to be added. |
545 | * \param request pointer to a struct drm_buf_desc describing the request. | 545 | * \param request pointer to a struct drm_buf_desc describing the request. |
546 | * \return zero on success or a negative number on failure. | 546 | * \return zero on success or a negative number on failure. |
547 | * | 547 | * |
@@ -549,7 +549,7 @@ static void drm_cleanup_buf_error(drm_device_t * dev, drm_buf_entry_t * entry) | |||
549 | * reallocates the buffer list of the same size order to accommodate the new | 549 | * reallocates the buffer list of the same size order to accommodate the new |
550 | * buffers. | 550 | * buffers. |
551 | */ | 551 | */ |
552 | int drm_addbufs_agp(drm_device_t * dev, struct drm_buf_desc * request) | 552 | int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request) |
553 | { | 553 | { |
554 | drm_device_dma_t *dma = dev->dma; | 554 | drm_device_dma_t *dma = dev->dma; |
555 | drm_buf_entry_t *entry; | 555 | drm_buf_entry_t *entry; |
@@ -719,7 +719,7 @@ int drm_addbufs_agp(drm_device_t * dev, struct drm_buf_desc * request) | |||
719 | EXPORT_SYMBOL(drm_addbufs_agp); | 719 | EXPORT_SYMBOL(drm_addbufs_agp); |
720 | #endif /* __OS_HAS_AGP */ | 720 | #endif /* __OS_HAS_AGP */ |
721 | 721 | ||
722 | int drm_addbufs_pci(drm_device_t * dev, struct drm_buf_desc * request) | 722 | int drm_addbufs_pci(struct drm_device * dev, struct drm_buf_desc * request) |
723 | { | 723 | { |
724 | drm_device_dma_t *dma = dev->dma; | 724 | drm_device_dma_t *dma = dev->dma; |
725 | int count; | 725 | int count; |
@@ -945,7 +945,7 @@ int drm_addbufs_pci(drm_device_t * dev, struct drm_buf_desc * request) | |||
945 | } | 945 | } |
946 | EXPORT_SYMBOL(drm_addbufs_pci); | 946 | EXPORT_SYMBOL(drm_addbufs_pci); |
947 | 947 | ||
948 | static int drm_addbufs_sg(drm_device_t * dev, struct drm_buf_desc * request) | 948 | static int drm_addbufs_sg(struct drm_device * dev, struct drm_buf_desc * request) |
949 | { | 949 | { |
950 | drm_device_dma_t *dma = dev->dma; | 950 | drm_device_dma_t *dma = dev->dma; |
951 | drm_buf_entry_t *entry; | 951 | drm_buf_entry_t *entry; |
@@ -1107,7 +1107,7 @@ static int drm_addbufs_sg(drm_device_t * dev, struct drm_buf_desc * request) | |||
1107 | return 0; | 1107 | return 0; |
1108 | } | 1108 | } |
1109 | 1109 | ||
1110 | static int drm_addbufs_fb(drm_device_t * dev, struct drm_buf_desc * request) | 1110 | static int drm_addbufs_fb(struct drm_device * dev, struct drm_buf_desc * request) |
1111 | { | 1111 | { |
1112 | drm_device_dma_t *dma = dev->dma; | 1112 | drm_device_dma_t *dma = dev->dma; |
1113 | drm_buf_entry_t *entry; | 1113 | drm_buf_entry_t *entry; |
@@ -1286,8 +1286,8 @@ int drm_addbufs(struct inode *inode, struct file *filp, | |||
1286 | unsigned int cmd, unsigned long arg) | 1286 | unsigned int cmd, unsigned long arg) |
1287 | { | 1287 | { |
1288 | struct drm_buf_desc request; | 1288 | struct drm_buf_desc request; |
1289 | drm_file_t *priv = filp->private_data; | 1289 | struct drm_file *priv = filp->private_data; |
1290 | drm_device_t *dev = priv->head->dev; | 1290 | struct drm_device *dev = priv->head->dev; |
1291 | int ret; | 1291 | int ret; |
1292 | 1292 | ||
1293 | if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) | 1293 | if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) |
@@ -1337,8 +1337,8 @@ int drm_addbufs(struct inode *inode, struct file *filp, | |||
1337 | int drm_infobufs(struct inode *inode, struct file *filp, | 1337 | int drm_infobufs(struct inode *inode, struct file *filp, |
1338 | unsigned int cmd, unsigned long arg) | 1338 | unsigned int cmd, unsigned long arg) |
1339 | { | 1339 | { |
1340 | drm_file_t *priv = filp->private_data; | 1340 | struct drm_file *priv = filp->private_data; |
1341 | drm_device_t *dev = priv->head->dev; | 1341 | struct drm_device *dev = priv->head->dev; |
1342 | drm_device_dma_t *dma = dev->dma; | 1342 | drm_device_dma_t *dma = dev->dma; |
1343 | struct drm_buf_info request; | 1343 | struct drm_buf_info request; |
1344 | struct drm_buf_info __user *argp = (void __user *)arg; | 1344 | struct drm_buf_info __user *argp = (void __user *)arg; |
@@ -1425,8 +1425,8 @@ int drm_infobufs(struct inode *inode, struct file *filp, | |||
1425 | int drm_markbufs(struct inode *inode, struct file *filp, | 1425 | int drm_markbufs(struct inode *inode, struct file *filp, |
1426 | unsigned int cmd, unsigned long arg) | 1426 | unsigned int cmd, unsigned long arg) |
1427 | { | 1427 | { |
1428 | drm_file_t *priv = filp->private_data; | 1428 | struct drm_file *priv = filp->private_data; |
1429 | drm_device_t *dev = priv->head->dev; | 1429 | struct drm_device *dev = priv->head->dev; |
1430 | drm_device_dma_t *dma = dev->dma; | 1430 | drm_device_dma_t *dma = dev->dma; |
1431 | struct drm_buf_desc request; | 1431 | struct drm_buf_desc request; |
1432 | int order; | 1432 | int order; |
@@ -1475,8 +1475,8 @@ int drm_markbufs(struct inode *inode, struct file *filp, | |||
1475 | int drm_freebufs(struct inode *inode, struct file *filp, | 1475 | int drm_freebufs(struct inode *inode, struct file *filp, |
1476 | unsigned int cmd, unsigned long arg) | 1476 | unsigned int cmd, unsigned long arg) |
1477 | { | 1477 | { |
1478 | drm_file_t *priv = filp->private_data; | 1478 | struct drm_file *priv = filp->private_data; |
1479 | drm_device_t *dev = priv->head->dev; | 1479 | struct drm_device *dev = priv->head->dev; |
1480 | drm_device_dma_t *dma = dev->dma; | 1480 | drm_device_dma_t *dma = dev->dma; |
1481 | struct drm_buf_free request; | 1481 | struct drm_buf_free request; |
1482 | int i; | 1482 | int i; |
@@ -1531,8 +1531,8 @@ int drm_freebufs(struct inode *inode, struct file *filp, | |||
1531 | int drm_mapbufs(struct inode *inode, struct file *filp, | 1531 | int drm_mapbufs(struct inode *inode, struct file *filp, |
1532 | unsigned int cmd, unsigned long arg) | 1532 | unsigned int cmd, unsigned long arg) |
1533 | { | 1533 | { |
1534 | drm_file_t *priv = filp->private_data; | 1534 | struct drm_file *priv = filp->private_data; |
1535 | drm_device_t *dev = priv->head->dev; | 1535 | struct drm_device *dev = priv->head->dev; |
1536 | drm_device_dma_t *dma = dev->dma; | 1536 | drm_device_dma_t *dma = dev->dma; |
1537 | struct drm_buf_map __user *argp = (void __user *)arg; | 1537 | struct drm_buf_map __user *argp = (void __user *)arg; |
1538 | int retcode = 0; | 1538 | int retcode = 0; |