Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: ftdi_usb: Eliminate ioctl and BKL ioctl use

ftdi has one ioctl, which is buggy and for debugging. Kill it off

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Alan Cox and committed by
Greg Kroah-Hartman
1160d076 44c389a0

-24
-24
drivers/usb/misc/ftdi-elan.c
··· 656 656 } 657 657 658 658 659 - #define FTDI_ELAN_IOC_MAGIC 0xA1 660 - #define FTDI_ELAN_IOCDEBUG _IOC(_IOC_WRITE, FTDI_ELAN_IOC_MAGIC, 1, 132) 661 - static int ftdi_elan_ioctl(struct inode *inode, struct file *file, 662 - unsigned int cmd, unsigned long arg) 663 - { 664 - switch (cmd) { 665 - case FTDI_ELAN_IOCDEBUG:{ 666 - char line[132]; 667 - int size = strncpy_from_user(line, 668 - (const char __user *)arg, sizeof(line)); 669 - if (size < 0) { 670 - return -EINVAL; 671 - } else { 672 - printk(KERN_ERR "TODO: ioctl %s\n", line); 673 - return 0; 674 - } 675 - } 676 - default: 677 - return -EFAULT; 678 - } 679 - } 680 - 681 - 682 659 /* 683 660 * 684 661 * blocking bulk reads are used to get data from the device ··· 1199 1222 static const struct file_operations ftdi_elan_fops = { 1200 1223 .owner = THIS_MODULE, 1201 1224 .llseek = no_llseek, 1202 - .ioctl = ftdi_elan_ioctl, 1203 1225 .read = ftdi_elan_read, 1204 1226 .write = ftdi_elan_write, 1205 1227 .open = ftdi_elan_open,