diff options
author | Ian Romanick <idr@us.ibm.com> | 2007-09-18 11:03:08 -0700 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2007-09-18 11:03:08 -0700 |
commit | e7d4a26913ba3a4949ac36280925062948ee21ce (patch) | |
tree | e702a1334d604066ea6eea4784514e9fd34d8bd0 | |
parent | 41345b95a2cdc1e509171d31fc8aed8cecb43dbd (diff) |
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.
-rw-r--r-- | linux-core/drm_ioc32.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/linux-core/drm_ioc32.c b/linux-core/drm_ioc32.c index 558376de1..0188154e2 100644 --- a/linux-core/drm_ioc32.c +++ b/linux-core/drm_ioc32.c @@ -1051,8 +1051,13 @@ long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) drm_ioctl_compat_t *fn; int ret; + + /* Assume that ioctls without an explicit compat routine will "just + * work". This may not always be a good assumption, but it's better + * than always failing. + */ if (nr >= DRM_ARRAY_SIZE(drm_compat_ioctls)) - return -ENOTTY; + return drm_ioctl(filp->f_dentry->d_inode, filp, cmd, arg); fn = drm_compat_ioctls[nr]; |