Commit 88e3cb07 authored by Al Viro's avatar Al Viro

drm_compat_ioctl(): tidy up a bit

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 87d3ce11
...@@ -951,6 +951,7 @@ static struct { ...@@ -951,6 +951,7 @@ static struct {
long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{ {
unsigned int nr = DRM_IOCTL_NR(cmd); unsigned int nr = DRM_IOCTL_NR(cmd);
struct drm_file *file_priv = filp->private_data;
drm_ioctl_compat_t *fn; drm_ioctl_compat_t *fn;
int ret; int ret;
...@@ -965,19 +966,14 @@ long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -965,19 +966,14 @@ long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (!fn) if (!fn)
return drm_ioctl(filp, cmd, arg); return drm_ioctl(filp, cmd, arg);
if (drm_compat_ioctls[nr].name) { DRM_DEBUG("pid=%d, dev=0x%lx, auth=%d, %s\n",
struct drm_file *file_priv = filp->private_data; task_pid_nr(current),
DRM_DEBUG("pid=%d, dev=0x%lx, auth=%d, %s\n", (long)old_encode_dev(file_priv->minor->kdev->devt),
task_pid_nr(current), file_priv->authenticated,
(long)old_encode_dev(file_priv->minor->kdev->devt), drm_compat_ioctls[nr].name);
file_priv->authenticated, ret = (*fn)(filp, cmd, arg);
drm_compat_ioctls[nr].name); if (ret)
ret = (*fn) (filp, cmd, arg); DRM_DEBUG("ret = %d\n", ret);
if (ret)
DRM_DEBUG("ret = %d\n", ret);
} else {
ret = (*fn) (filp, cmd, arg);
}
return ret; return ret;
} }
EXPORT_SYMBOL(drm_compat_ioctl); EXPORT_SYMBOL(drm_compat_ioctl);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment