diff options
author | Andres Salomon <dilinger@collabora.co.uk> | 2009-11-17 17:41:23 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-11-17 19:02:49 -0500 |
commit | 156822f7175d9ceb9d7e808502d3c5de8841e047 (patch) | |
tree | 1eb79f8e11c1ce4710dcdd83210d1acb5cd95b39 /drivers/gpu | |
parent | 420a457088669e055e767dfb8468909cd1799cf9 (diff) |
drm: kill more unused DRM macros
There are a few more macros in drmP.h that are unused; DRM_GET_PRIV_SAREA,
DRM_ARRAY_SIZE, and DRM_WAITCOUNT can go away completely.
Unfortunately, DRM_COPY is still used in one place, but we can at least
move it to where it's used. It's an awful looking macro..
[akpm: fix overeagerness]
Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index a75ca63deea6..43297ca45f3e 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c | |||
@@ -366,6 +366,18 @@ module_init(drm_core_init); | |||
366 | module_exit(drm_core_exit); | 366 | module_exit(drm_core_exit); |
367 | 367 | ||
368 | /** | 368 | /** |
369 | * Copy and IOCTL return string to user space | ||
370 | */ | ||
371 | #define DRM_COPY(name, value) \ | ||
372 | len = strlen(value); \ | ||
373 | if (len > name##_len) len = name##_len; \ | ||
374 | name##_len = strlen(value); \ | ||
375 | if (len && name) { \ | ||
376 | if (copy_to_user(name, value, len)) \ | ||
377 | return -EFAULT; \ | ||
378 | } | ||
379 | |||
380 | /** | ||
369 | * Get version information | 381 | * Get version information |
370 | * | 382 | * |
371 | * \param inode device inode. | 383 | * \param inode device inode. |