summaryrefslogtreecommitdiff
path: root/bsd/drm_dma.h
diff options
context:
space:
mode:
Diffstat (limited to 'bsd/drm_dma.h')
-rw-r--r--bsd/drm_dma.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/bsd/drm_dma.h b/bsd/drm_dma.h
index 3fd1bfe6..7c31a6e2 100644
--- a/bsd/drm_dma.h
+++ b/bsd/drm_dma.h
@@ -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);
}
}