aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_drv.c12
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);
366module_exit(drm_core_exit); 366module_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.