diff options
Diffstat (limited to 'bsd-core')
-rw-r--r-- | bsd-core/drm_dma.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bsd-core/drm_dma.c b/bsd-core/drm_dma.c index 3fd1bfe6..7c31a6e2 100644 --- a/bsd-core/drm_dma.c +++ b/bsd-core/drm_dma.c @@ -602,20 +602,19 @@ int DRM(control)( DRM_OS_IOCTL ) #else -int DRM(control)( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ) +int DRM(control)( DRM_OS_IOCTL ) { + DRM_OS_DEVICE; drm_control_t ctl; - if ( copy_from_user( &ctl, (drm_control_t *)arg, sizeof(ctl) ) ) - return -EFAULT; + DRM_OS_KRNFROMUSR( ctl, (drm_control_t *) data, sizeof(ctl) ); switch ( ctl.func ) { case DRM_INST_HANDLER: case DRM_UNINST_HANDLER: return 0; default: - return -EINVAL; + DRM_OS_RETURN(EINVAL); } } |