X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fdrm%2Fdrm_drv.h;h=4e67b7bd451a84bca6fca4af972dd34277fc487a;hb=f9296eb00ed30209424102d3c920e69617eea853;hp=389fc7ef2b567ca3ea30962a91a12edd19f4c5dd;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/drivers/char/drm/drm_drv.h b/drivers/char/drm/drm_drv.h index 389fc7ef2..4e67b7bd4 100644 --- a/drivers/char/drm/drm_drv.h +++ b/drivers/char/drm/drm_drv.h @@ -243,7 +243,7 @@ static drm_ioctl_desc_t DRM(ioctls)[] = { [DRM_IOCTL_NR(DRM_IOCTL_SG_FREE)] = { DRM(sg_free), 1, 1 }, #endif -#ifdef __HAVE_VBL_IRQ +#if __HAVE_VBL_IRQ [DRM_IOCTL_NR(DRM_IOCTL_WAIT_VBLANK)] = { DRM(wait_vblank), 0, 0 }, #endif @@ -532,7 +532,7 @@ static int DRM(takedown)( drm_device_t *dev ) #endif if ( dev->lock.hw_lock ) { dev->sigdata.lock = dev->lock.hw_lock = NULL; /* SHM removed */ - dev->lock.filp = NULL; + dev->lock.filp = 0; wake_up_interruptible( &dev->lock.lock_queue ); } up( &dev->struct_sem ); @@ -741,11 +741,12 @@ module_exit( drm_cleanup ); int DRM(version)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg ) { - drm_version_t __user *argp = (void __user *)arg; drm_version_t version; int len; - if ( copy_from_user( &version, argp, sizeof(version) ) ) + if ( copy_from_user( &version, + (drm_version_t *)arg, + sizeof(version) ) ) return -EFAULT; #define DRM_COPY( name, value ) \ @@ -765,7 +766,9 @@ int DRM(version)( struct inode *inode, struct file *filp, DRM_COPY( version.date, DRIVER_DATE ); DRM_COPY( version.desc, DRIVER_DESC ); - if ( copy_to_user( argp, &version, sizeof(version) ) ) + if ( copy_to_user( (drm_version_t *)arg, + &version, + sizeof(version) ) ) return -EFAULT; return 0; } @@ -1045,7 +1048,7 @@ int DRM(lock)( struct inode *inode, struct file *filp, ++priv->lock_count; - if ( copy_from_user( &lock, (drm_lock_t __user *)arg, sizeof(lock) ) ) + if ( copy_from_user( &lock, (drm_lock_t *)arg, sizeof(lock) ) ) return -EFAULT; if ( lock.context == DRM_KERNEL_CONTEXT ) { @@ -1158,7 +1161,7 @@ int DRM(unlock)( struct inode *inode, struct file *filp, drm_device_t *dev = priv->dev; drm_lock_t lock; - if ( copy_from_user( &lock, (drm_lock_t __user *)arg, sizeof(lock) ) ) + if ( copy_from_user( &lock, (drm_lock_t *)arg, sizeof(lock) ) ) return -EFAULT; if ( lock.context == DRM_KERNEL_CONTEXT ) { @@ -1178,7 +1181,7 @@ int DRM(unlock)( struct inode *inode, struct file *filp, * agent to request it then we should just be able to * take it immediately and not eat the ioctl. */ - dev->lock.filp = NULL; + dev->lock.filp = 0; { __volatile__ unsigned int *plock = &dev->lock.hw_lock->lock; unsigned int old, new, prev, ctx;