diff options
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/drmP.h | 3 | ||||
-rw-r--r-- | linux-core/drm_drv.c | 3 | ||||
-rw-r--r-- | linux-core/drm_fops.c | 2 | ||||
-rw-r--r-- | linux-core/drm_os_linux.h | 4 |
4 files changed, 12 insertions, 0 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 3d379664..f0fc64d4 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -520,6 +520,9 @@ typedef struct drm_file { struct drm_device *dev; int remove_auth_on_close; unsigned long lock_count; +#ifdef DRIVER_FILE_FIELDS + DRIVER_FILE_FIELDS; +#endif } drm_file_t; /** Wait queue */ diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index e0c00f02..e472dc33 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -126,6 +126,9 @@ #ifndef DRIVER_IOCTLS #define DRIVER_IOCTLS #endif +#ifndef DRIVER_OPEN_HELPER +#define DRIVER_OPEN_HELPER( priv, dev ) +#endif #ifndef DRIVER_FOPS #define DRIVER_FOPS \ static struct file_operations DRM(fops) = { \ diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c index f4841ae8..771a2fa2 100644 --- a/linux-core/drm_fops.c +++ b/linux-core/drm_fops.c @@ -73,6 +73,8 @@ int DRM(open_helper)(struct inode *inode, struct file *filp, drm_device_t *dev) priv->authenticated = capable(CAP_SYS_ADMIN); priv->lock_count = 0; + DRIVER_OPEN_HELPER( priv, dev ); + down(&dev->struct_sem); if (!dev->file_last) { priv->next = NULL; diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h index cf7d7c2d..c26a4108 100644 --- a/linux-core/drm_os_linux.h +++ b/linux-core/drm_os_linux.h @@ -74,8 +74,12 @@ typedef void irqreturn_t; verify_area( VERIFY_READ, uaddr, size ) #define DRM_COPY_FROM_USER_UNCHECKED(arg1, arg2, arg3) \ __copy_from_user(arg1, arg2, arg3) +#define DRM_COPY_TO_USER_UNCHECKED(arg1, arg2, arg3) \ + __copy_to_user(arg1, arg2, arg3) #define DRM_GET_USER_UNCHECKED(val, uaddr) \ __get_user(val, uaddr) +#define DRM_PUT_USER_UNCHECKED(uaddr, val) \ + __put_user(val, uaddr) /** 'malloc' without the overhead of DRM(alloc)() */ |