summaryrefslogtreecommitdiff
path: root/linux/drm_irq.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drm_irq.h')
-rw-r--r--linux/drm_irq.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/linux/drm_irq.h b/linux/drm_irq.h
index f53f142a..035eb70f 100644
--- a/linux/drm_irq.h
+++ b/linux/drm_irq.h
@@ -66,9 +66,10 @@ int DRM(irq_by_busid)(struct inode *inode, struct file *filp,
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev;
+ drm_irq_busid_t __user *argp = (void __user *)arg;
drm_irq_busid_t p;
- if (copy_from_user(&p, (drm_irq_busid_t *)arg, sizeof(p)))
+ if (copy_from_user(&p, argp, sizeof(p)))
return -EFAULT;
if ((p.busnum >> 8) != dev->pci_domain ||
@@ -81,7 +82,7 @@ int DRM(irq_by_busid)(struct inode *inode, struct file *filp,
DRM_DEBUG("%d:%d:%d => IRQ %d\n",
p.busnum, p.devnum, p.funcnum, p.irq);
- if (copy_to_user((drm_irq_busid_t *)arg, &p, sizeof(p)))
+ if (copy_to_user(argp, &p, sizeof(p)))
return -EFAULT;
return 0;
}
@@ -214,7 +215,7 @@ int DRM(control)( struct inode *inode, struct file *filp,
drm_device_t *dev = priv->dev;
drm_control_t ctl;
- if ( copy_from_user( &ctl, (drm_control_t *)arg, sizeof(ctl) ) )
+ if ( copy_from_user( &ctl, (drm_control_t __user *)arg, sizeof(ctl) ) )
return -EFAULT;
switch ( ctl.func ) {
@@ -255,6 +256,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev;
+ drm_wait_vblank_t __user *argp = (void __user *)data;
drm_wait_vblank_t vblwait;
struct timeval now;
int ret = 0;
@@ -263,8 +265,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
if (!dev->irq)
return -EINVAL;
- DRM_COPY_FROM_USER_IOCTL( vblwait, (drm_wait_vblank_t *)data,
- sizeof(vblwait) );
+ DRM_COPY_FROM_USER_IOCTL( vblwait, argp, sizeof(vblwait) );
switch ( vblwait.request.type & ~_DRM_VBLANK_FLAGS_MASK ) {
case _DRM_VBLANK_RELATIVE:
@@ -333,8 +334,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
}
done:
- DRM_COPY_TO_USER_IOCTL( (drm_wait_vblank_t *)data, vblwait,
- sizeof(vblwait) );
+ DRM_COPY_TO_USER_IOCTL( argp, vblwait, sizeof(vblwait) );
return ret;
}