diff options
author | Dave Airlie <airlied@linux.ie> | 2007-07-11 01:27:12 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-07-11 01:27:12 -0400 |
commit | c60ce623bd16137627009d05e311d877729f2ad6 (patch) | |
tree | 4d06337a217ccc6c21f8ad96c3b342a1e9452057 /drivers/char/drm/drm_context.c | |
parent | c6c656b4b6ddfc964f1a43394bf86bc76c5e8119 (diff) |
drm: remove a bunch of typedefs on the userspace interface
This moves a bunch of typedefs into a !defined __KERNEL__ to keep userspace
API compatiblity, it changes all internal usages to structs/enum/unions.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_context.c')
-rw-r--r-- | drivers/char/drm/drm_context.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/drivers/char/drm/drm_context.c b/drivers/char/drm/drm_context.c index e1f882dc55aa..283f8f2895cb 100644 --- a/drivers/char/drm/drm_context.c +++ b/drivers/char/drm/drm_context.c | |||
@@ -100,7 +100,7 @@ static int drm_ctxbitmap_next(drm_device_t * dev) | |||
100 | if ((bit + 1) > dev->max_context) { | 100 | if ((bit + 1) > dev->max_context) { |
101 | dev->max_context = (bit + 1); | 101 | dev->max_context = (bit + 1); |
102 | if (dev->context_sareas) { | 102 | if (dev->context_sareas) { |
103 | drm_map_t **ctx_sareas; | 103 | struct drm_map **ctx_sareas; |
104 | 104 | ||
105 | ctx_sareas = drm_realloc(dev->context_sareas, | 105 | ctx_sareas = drm_realloc(dev->context_sareas, |
106 | (dev->max_context - | 106 | (dev->max_context - |
@@ -214,9 +214,9 @@ int drm_getsareactx(struct inode *inode, struct file *filp, | |||
214 | { | 214 | { |
215 | drm_file_t *priv = filp->private_data; | 215 | drm_file_t *priv = filp->private_data; |
216 | drm_device_t *dev = priv->head->dev; | 216 | drm_device_t *dev = priv->head->dev; |
217 | drm_ctx_priv_map_t __user *argp = (void __user *)arg; | 217 | struct drm_ctx_priv_map __user *argp = (void __user *)arg; |
218 | drm_ctx_priv_map_t request; | 218 | struct drm_ctx_priv_map request; |
219 | drm_map_t *map; | 219 | struct drm_map *map; |
220 | drm_map_list_t *_entry; | 220 | drm_map_list_t *_entry; |
221 | 221 | ||
222 | if (copy_from_user(&request, argp, sizeof(request))) | 222 | if (copy_from_user(&request, argp, sizeof(request))) |
@@ -265,12 +265,13 @@ int drm_setsareactx(struct inode *inode, struct file *filp, | |||
265 | { | 265 | { |
266 | drm_file_t *priv = filp->private_data; | 266 | drm_file_t *priv = filp->private_data; |
267 | drm_device_t *dev = priv->head->dev; | 267 | drm_device_t *dev = priv->head->dev; |
268 | drm_ctx_priv_map_t request; | 268 | struct drm_ctx_priv_map request; |
269 | drm_map_t *map = NULL; | 269 | struct drm_map *map = NULL; |
270 | drm_map_list_t *r_list = NULL; | 270 | drm_map_list_t *r_list = NULL; |
271 | 271 | ||
272 | if (copy_from_user(&request, | 272 | if (copy_from_user(&request, |
273 | (drm_ctx_priv_map_t __user *) arg, sizeof(request))) | 273 | (struct drm_ctx_priv_map __user *) arg, |
274 | sizeof(request))) | ||
274 | return -EFAULT; | 275 | return -EFAULT; |
275 | 276 | ||
276 | mutex_lock(&dev->struct_mutex); | 277 | mutex_lock(&dev->struct_mutex); |
@@ -370,9 +371,9 @@ static int drm_context_switch_complete(drm_device_t * dev, int new) | |||
370 | int drm_resctx(struct inode *inode, struct file *filp, | 371 | int drm_resctx(struct inode *inode, struct file *filp, |
371 | unsigned int cmd, unsigned long arg) | 372 | unsigned int cmd, unsigned long arg) |
372 | { | 373 | { |
373 | drm_ctx_res_t res; | 374 | struct drm_ctx_res res; |
374 | drm_ctx_t __user *argp = (void __user *)arg; | 375 | struct drm_ctx_res __user *argp = (void __user *)arg; |
375 | drm_ctx_t ctx; | 376 | struct drm_ctx ctx; |
376 | int i; | 377 | int i; |
377 | 378 | ||
378 | if (copy_from_user(&res, argp, sizeof(res))) | 379 | if (copy_from_user(&res, argp, sizeof(res))) |
@@ -410,8 +411,8 @@ int drm_addctx(struct inode *inode, struct file *filp, | |||
410 | drm_file_t *priv = filp->private_data; | 411 | drm_file_t *priv = filp->private_data; |
411 | drm_device_t *dev = priv->head->dev; | 412 | drm_device_t *dev = priv->head->dev; |
412 | drm_ctx_list_t *ctx_entry; | 413 | drm_ctx_list_t *ctx_entry; |
413 | drm_ctx_t __user *argp = (void __user *)arg; | 414 | struct drm_ctx __user *argp = (void __user *)arg; |
414 | drm_ctx_t ctx; | 415 | struct drm_ctx ctx; |
415 | 416 | ||
416 | if (copy_from_user(&ctx, argp, sizeof(ctx))) | 417 | if (copy_from_user(&ctx, argp, sizeof(ctx))) |
417 | return -EFAULT; | 418 | return -EFAULT; |
@@ -475,8 +476,8 @@ int drm_modctx(struct inode *inode, struct file *filp, | |||
475 | int drm_getctx(struct inode *inode, struct file *filp, | 476 | int drm_getctx(struct inode *inode, struct file *filp, |
476 | unsigned int cmd, unsigned long arg) | 477 | unsigned int cmd, unsigned long arg) |
477 | { | 478 | { |
478 | drm_ctx_t __user *argp = (void __user *)arg; | 479 | struct drm_ctx __user *argp = (void __user *)arg; |
479 | drm_ctx_t ctx; | 480 | struct drm_ctx ctx; |
480 | 481 | ||
481 | if (copy_from_user(&ctx, argp, sizeof(ctx))) | 482 | if (copy_from_user(&ctx, argp, sizeof(ctx))) |
482 | return -EFAULT; | 483 | return -EFAULT; |
@@ -505,9 +506,9 @@ int drm_switchctx(struct inode *inode, struct file *filp, | |||
505 | { | 506 | { |
506 | drm_file_t *priv = filp->private_data; | 507 | drm_file_t *priv = filp->private_data; |
507 | drm_device_t *dev = priv->head->dev; | 508 | drm_device_t *dev = priv->head->dev; |
508 | drm_ctx_t ctx; | 509 | struct drm_ctx ctx; |
509 | 510 | ||
510 | if (copy_from_user(&ctx, (drm_ctx_t __user *) arg, sizeof(ctx))) | 511 | if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx))) |
511 | return -EFAULT; | 512 | return -EFAULT; |
512 | 513 | ||
513 | DRM_DEBUG("%d\n", ctx.handle); | 514 | DRM_DEBUG("%d\n", ctx.handle); |
@@ -530,9 +531,9 @@ int drm_newctx(struct inode *inode, struct file *filp, | |||
530 | { | 531 | { |
531 | drm_file_t *priv = filp->private_data; | 532 | drm_file_t *priv = filp->private_data; |
532 | drm_device_t *dev = priv->head->dev; | 533 | drm_device_t *dev = priv->head->dev; |
533 | drm_ctx_t ctx; | 534 | struct drm_ctx ctx; |
534 | 535 | ||
535 | if (copy_from_user(&ctx, (drm_ctx_t __user *) arg, sizeof(ctx))) | 536 | if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx))) |
536 | return -EFAULT; | 537 | return -EFAULT; |
537 | 538 | ||
538 | DRM_DEBUG("%d\n", ctx.handle); | 539 | DRM_DEBUG("%d\n", ctx.handle); |
@@ -557,9 +558,9 @@ int drm_rmctx(struct inode *inode, struct file *filp, | |||
557 | { | 558 | { |
558 | drm_file_t *priv = filp->private_data; | 559 | drm_file_t *priv = filp->private_data; |
559 | drm_device_t *dev = priv->head->dev; | 560 | drm_device_t *dev = priv->head->dev; |
560 | drm_ctx_t ctx; | 561 | struct drm_ctx ctx; |
561 | 562 | ||
562 | if (copy_from_user(&ctx, (drm_ctx_t __user *) arg, sizeof(ctx))) | 563 | if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx))) |
563 | return -EFAULT; | 564 | return -EFAULT; |
564 | 565 | ||
565 | DRM_DEBUG("%d\n", ctx.handle); | 566 | DRM_DEBUG("%d\n", ctx.handle); |