diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2015-07-11 07:31:08 +0200 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2015-08-12 19:06:18 +0200 |
commit | 5101020c78c9f242fe77bd7986bc24f7b800172a (patch) | |
tree | 21c4b7350c58d48b492d7cc87c55bdc57ff538b9 /drivers/gpu | |
parent | drm/vmwgfx: Fix crash when unloading vmwgfx v2 (diff) | |
download | linux-5101020c78c9f242fe77bd7986bc24f7b800172a.tar.xz linux-5101020c78c9f242fe77bd7986bc24f7b800172a.zip |
drm: export the DRM permission check code
This way drm_ioctl_permit() can be used by drivers
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index b1d303fa2327..9a860ca1e9d7 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -480,7 +480,7 @@ static int drm_version(struct drm_device *dev, void *data, * indicated permissions. If so, returns zero. Otherwise returns an * error code suitable for ioctl return. */ -static int drm_ioctl_permit(u32 flags, struct drm_file *file_priv) +int drm_ioctl_permit(u32 flags, struct drm_file *file_priv) { /* ROOT_ONLY is only for CAP_SYS_ADMIN */ if (unlikely((flags & DRM_ROOT_ONLY) && !capable(CAP_SYS_ADMIN))) @@ -508,6 +508,7 @@ static int drm_ioctl_permit(u32 flags, struct drm_file *file_priv) return 0; } +EXPORT_SYMBOL(drm_ioctl_permit); #define DRM_IOCTL_DEF(ioctl, _func, _flags) \ [DRM_IOCTL_NR(ioctl)] = { \ |