]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/compat_ioctl.c
USB: serial: hp4x.c: use module_usb_serial_driver
[karo-tx-linux.git] / fs / compat_ioctl.c
index 51352de88ef10ea41583661f39625f93b475aa34..a26bea10e81bae5c9ee1890102ce86b7929bde28 100644 (file)
 
 #include <linux/hiddev.h>
 
+#define __DVB_CORE__
 #include <linux/dvb/audio.h>
 #include <linux/dvb/dmx.h>
 #include <linux/dvb/frontend.h>
@@ -1506,35 +1507,6 @@ static long do_ioctl_trans(int fd, unsigned int cmd,
        return -ENOIOCTLCMD;
 }
 
-static void compat_ioctl_error(struct file *filp, unsigned int fd,
-               unsigned int cmd, unsigned long arg)
-{
-       char buf[10];
-       char *fn = "?";
-       char *path;
-
-       /* find the name of the device. */
-       path = (char *)__get_free_page(GFP_KERNEL);
-       if (path) {
-               fn = d_path(&filp->f_path, path, PAGE_SIZE);
-               if (IS_ERR(fn))
-                       fn = "?";
-       }
-
-        sprintf(buf,"'%c'", (cmd>>_IOC_TYPESHIFT) & _IOC_TYPEMASK);
-       if (!isprint(buf[1]))
-               sprintf(buf, "%02x", buf[1]);
-       compat_printk("ioctl32(%s:%d): Unknown cmd fd(%d) "
-                       "cmd(%08x){t:%s;sz:%u} arg(%08x) on %s\n",
-                       current->comm, current->pid,
-                       (int)fd, (unsigned int)cmd, buf,
-                       (cmd >> _IOC_SIZESHIFT) & _IOC_SIZEMASK,
-                       (unsigned int)arg, fn);
-
-       if (path)
-               free_page((unsigned long)path);
-}
-
 static int compat_ioctl_check_table(unsigned int xcmd)
 {
        int i;
@@ -1621,13 +1593,8 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
                goto found_handler;
 
        error = do_ioctl_trans(fd, cmd, arg, filp);
-       if (error == -ENOIOCTLCMD) {
-               static int count;
-
-               if (++count <= 50)
-                       compat_ioctl_error(filp, fd, cmd, arg);
-               error = -EINVAL;
-       }
+       if (error == -ENOIOCTLCMD)
+               error = -ENOTTY;
 
        goto out_fput;