]> err.no Git - linux-2.6/blobdiff - drivers/char/drm/drm_ioc32.c
Merge git://git.infradead.org/mtd-2.6
[linux-2.6] / drivers / char / drm / drm_ioc32.c
index 462f46f2049a4e7f15437fec760af2b885be5762..90f5a8d9bdcb67057ecf97301dee8d2f5ceb1566 100644 (file)
@@ -1040,7 +1040,7 @@ drm_ioctl_compat_t *drm_compat_ioctls[] = {
  * Called whenever a 32-bit process running under a 64-bit kernel
  * performs an ioctl on /dev/drm.
  *
- * \param filp file pointer.
+ * \param file_priv DRM file private.
  * \param cmd command.
  * \param arg user argument.
  * \return zero on success or negative number on failure.
@@ -1051,8 +1051,12 @@ 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 >= ARRAY_SIZE(drm_compat_ioctls))
-               return -ENOTTY;
+               return drm_ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
 
        fn = drm_compat_ioctls[nr];