aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_ioc32.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-11-22 02:02:08 -0500
committerDave Airlie <airlied@redhat.com>2008-02-07 00:09:39 -0500
commit7ffa05e0518ebc055ef8f68d7d53e5f7d2ba3428 (patch)
tree3c6f6fea3a0d585d4de5592f000e299596651427 /drivers/char/drm/drm_ioc32.c
parent47a184a80800dd69abd1206eea1b961070ce2ca3 (diff)
drm: Fix ioc32 compat layer
Previously any ioctls that weren't explicitly listed in the compat ioctl table would fail with ENOTTY. If the incoming ioctl number is outside the range of the table, assume that it Just Works, and pass it off to drm_ioctl. This make the fence related ioctls work on 64-bit PowerPC. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_ioc32.c')
-rw-r--r--drivers/char/drm/drm_ioc32.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/char/drm/drm_ioc32.c b/drivers/char/drm/drm_ioc32.c
index 2286f3312c5c..90f5a8d9bdcb 100644
--- a/drivers/char/drm/drm_ioc32.c
+++ b/drivers/char/drm/drm_ioc32.c
@@ -1051,8 +1051,12 @@ long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
1051 drm_ioctl_compat_t *fn; 1051 drm_ioctl_compat_t *fn;
1052 int ret; 1052 int ret;
1053 1053
1054 /* Assume that ioctls without an explicit compat routine will just
1055 * work. This may not always be a good assumption, but it's better
1056 * than always failing.
1057 */
1054 if (nr >= ARRAY_SIZE(drm_compat_ioctls)) 1058 if (nr >= ARRAY_SIZE(drm_compat_ioctls))
1055 return -ENOTTY; 1059 return drm_ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
1056 1060
1057 fn = drm_compat_ioctls[nr]; 1061 fn = drm_compat_ioctls[nr];
1058 1062