diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 15:19:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 15:19:23 -0400 |
commit | ec25e246b94a3233ab064994ef05a170bdba0e7c (patch) | |
tree | 49b7d7e4c46e13bb465c7b832961596e41e8526a /drivers/usb/class | |
parent | 507ffe4f3840ac24890a8123c702cf1b7fe4d33c (diff) | |
parent | 4626b8daf9bb00ce6b4d533c1a155211ad880f32 (diff) |
Merge tag 'usb-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patches from Greg Kroah-Hartman:
"Here's the big USB pull request for 3.10-rc1.
Lots of USB patches here, the majority being USB gadget changes and
USB-serial driver cleanups, the rest being ARM build fixes / cleanups,
and individual driver updates. We also finally got some chipidea
fixes, which have been delayed for a number of kernel releases, as the
maintainer has now reappeared.
All of these have been in linux-next for a while"
* tag 'usb-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (568 commits)
USB: ehci-msm: USB_MSM_OTG needs USB_PHY
USB: OHCI: avoid conflicting platform drivers
USB: OMAP: ISP1301 needs USB_PHY
USB: lpc32xx: ISP1301 needs USB_PHY
USB: ftdi_sio: enable two UART ports on ST Microconnect Lite
usb: phy: tegra: don't call into tegra-ehci directly
usb: phy: phy core cannot yet be a module
USB: Fix initconst in ehci driver
usb-storage: CY7C68300A chips do not support Cypress ATACB
USB: serial: option: Added support Olivetti Olicard 145
USB: ftdi_sio: correct ST Micro Connect Lite PIDs
ARM: mxs_defconfig: add CONFIG_USB_PHY
ARM: imx_v6_v7_defconfig: add CONFIG_USB_PHY
usb: phy: remove exported function from __init section
usb: gadget: zero: put function instances on unbind
usb: gadget: f_sourcesink.c: correct a copy-paste misnomer
usb: gadget: cdc2: fix error return code in cdc_do_config()
usb: gadget: multi: fix error return code in rndis_do_config()
usb: gadget: f_obex: fix error return code in obex_bind()
USB: storage: convert to use module_usb_driver()
...
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/Kconfig | 6 | ||||
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 8 | ||||
-rw-r--r-- | drivers/usb/class/cdc-wdm.c | 19 | ||||
-rw-r--r-- | drivers/usb/class/usbtmc.c | 26 |
4 files changed, 24 insertions, 35 deletions
diff --git a/drivers/usb/class/Kconfig b/drivers/usb/class/Kconfig index 316aac8e4ca1..bb8b73682a70 100644 --- a/drivers/usb/class/Kconfig +++ b/drivers/usb/class/Kconfig | |||
@@ -2,11 +2,10 @@ | |||
2 | # USB Class driver configuration | 2 | # USB Class driver configuration |
3 | # | 3 | # |
4 | comment "USB Device Class drivers" | 4 | comment "USB Device Class drivers" |
5 | depends on USB | ||
6 | 5 | ||
7 | config USB_ACM | 6 | config USB_ACM |
8 | tristate "USB Modem (CDC ACM) support" | 7 | tristate "USB Modem (CDC ACM) support" |
9 | depends on USB && TTY | 8 | depends on TTY |
10 | ---help--- | 9 | ---help--- |
11 | This driver supports USB modems and ISDN adapters which support the | 10 | This driver supports USB modems and ISDN adapters which support the |
12 | Communication Device Class Abstract Control Model interface. | 11 | Communication Device Class Abstract Control Model interface. |
@@ -21,7 +20,6 @@ config USB_ACM | |||
21 | 20 | ||
22 | config USB_PRINTER | 21 | config USB_PRINTER |
23 | tristate "USB Printer support" | 22 | tristate "USB Printer support" |
24 | depends on USB | ||
25 | help | 23 | help |
26 | Say Y here if you want to connect a USB printer to your computer's | 24 | Say Y here if you want to connect a USB printer to your computer's |
27 | USB port. | 25 | USB port. |
@@ -31,7 +29,6 @@ config USB_PRINTER | |||
31 | 29 | ||
32 | config USB_WDM | 30 | config USB_WDM |
33 | tristate "USB Wireless Device Management support" | 31 | tristate "USB Wireless Device Management support" |
34 | depends on USB | ||
35 | ---help--- | 32 | ---help--- |
36 | This driver supports the WMC Device Management functionality | 33 | This driver supports the WMC Device Management functionality |
37 | of cell phones compliant to the CDC WMC specification. You can use | 34 | of cell phones compliant to the CDC WMC specification. You can use |
@@ -42,7 +39,6 @@ config USB_WDM | |||
42 | 39 | ||
43 | config USB_TMC | 40 | config USB_TMC |
44 | tristate "USB Test and Measurement Class support" | 41 | tristate "USB Test and Measurement Class support" |
45 | depends on USB | ||
46 | help | 42 | help |
47 | Say Y here if you want to connect a USB device that follows | 43 | Say Y here if you want to connect a USB device that follows |
48 | the USB.org specification for USB Test and Measurement devices | 44 | the USB.org specification for USB Test and Measurement devices |
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index c77f7ae48f1c..171d7a9df3ae 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -828,14 +828,6 @@ static int acm_tty_ioctl(struct tty_struct *tty, | |||
828 | return rv; | 828 | return rv; |
829 | } | 829 | } |
830 | 830 | ||
831 | static const __u32 acm_tty_speed[] = { | ||
832 | 0, 50, 75, 110, 134, 150, 200, 300, 600, | ||
833 | 1200, 1800, 2400, 4800, 9600, 19200, 38400, | ||
834 | 57600, 115200, 230400, 460800, 500000, 576000, | ||
835 | 921600, 1000000, 1152000, 1500000, 2000000, | ||
836 | 2500000, 3000000, 3500000, 4000000 | ||
837 | }; | ||
838 | |||
839 | static void acm_tty_set_termios(struct tty_struct *tty, | 831 | static void acm_tty_set_termios(struct tty_struct *tty, |
840 | struct ktermios *termios_old) | 832 | struct ktermios *termios_old) |
841 | { | 833 | { |
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 122d056d96d5..8a230f0ef77c 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/ioctl.h> | ||
16 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
17 | #include <linux/module.h> | 18 | #include <linux/module.h> |
18 | #include <linux/mutex.h> | 19 | #include <linux/mutex.h> |
@@ -644,6 +645,22 @@ static int wdm_release(struct inode *inode, struct file *file) | |||
644 | return 0; | 645 | return 0; |
645 | } | 646 | } |
646 | 647 | ||
648 | static long wdm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | ||
649 | { | ||
650 | struct wdm_device *desc = file->private_data; | ||
651 | int rv = 0; | ||
652 | |||
653 | switch (cmd) { | ||
654 | case IOCTL_WDM_MAX_COMMAND: | ||
655 | if (copy_to_user((void __user *)arg, &desc->wMaxCommand, sizeof(desc->wMaxCommand))) | ||
656 | rv = -EFAULT; | ||
657 | break; | ||
658 | default: | ||
659 | rv = -ENOTTY; | ||
660 | } | ||
661 | return rv; | ||
662 | } | ||
663 | |||
647 | static const struct file_operations wdm_fops = { | 664 | static const struct file_operations wdm_fops = { |
648 | .owner = THIS_MODULE, | 665 | .owner = THIS_MODULE, |
649 | .read = wdm_read, | 666 | .read = wdm_read, |
@@ -652,6 +669,8 @@ static const struct file_operations wdm_fops = { | |||
652 | .flush = wdm_flush, | 669 | .flush = wdm_flush, |
653 | .release = wdm_release, | 670 | .release = wdm_release, |
654 | .poll = wdm_poll, | 671 | .poll = wdm_poll, |
672 | .unlocked_ioctl = wdm_ioctl, | ||
673 | .compat_ioctl = wdm_ioctl, | ||
655 | .llseek = noop_llseek, | 674 | .llseek = noop_llseek, |
656 | }; | 675 | }; |
657 | 676 | ||
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 70d69d06054f..4c5506ae5e45 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c | |||
@@ -718,50 +718,32 @@ exit: | |||
718 | 718 | ||
719 | static int usbtmc_ioctl_clear_out_halt(struct usbtmc_device_data *data) | 719 | static int usbtmc_ioctl_clear_out_halt(struct usbtmc_device_data *data) |
720 | { | 720 | { |
721 | u8 *buffer; | ||
722 | int rv; | 721 | int rv; |
723 | 722 | ||
724 | buffer = kmalloc(2, GFP_KERNEL); | ||
725 | if (!buffer) | ||
726 | return -ENOMEM; | ||
727 | |||
728 | rv = usb_clear_halt(data->usb_dev, | 723 | rv = usb_clear_halt(data->usb_dev, |
729 | usb_sndbulkpipe(data->usb_dev, data->bulk_out)); | 724 | usb_sndbulkpipe(data->usb_dev, data->bulk_out)); |
730 | 725 | ||
731 | if (rv < 0) { | 726 | if (rv < 0) { |
732 | dev_err(&data->usb_dev->dev, "usb_control_msg returned %d\n", | 727 | dev_err(&data->usb_dev->dev, "usb_control_msg returned %d\n", |
733 | rv); | 728 | rv); |
734 | goto exit; | 729 | return rv; |
735 | } | 730 | } |
736 | rv = 0; | 731 | return 0; |
737 | |||
738 | exit: | ||
739 | kfree(buffer); | ||
740 | return rv; | ||
741 | } | 732 | } |
742 | 733 | ||
743 | static int usbtmc_ioctl_clear_in_halt(struct usbtmc_device_data *data) | 734 | static int usbtmc_ioctl_clear_in_halt(struct usbtmc_device_data *data) |
744 | { | 735 | { |
745 | u8 *buffer; | ||
746 | int rv; | 736 | int rv; |
747 | 737 | ||
748 | buffer = kmalloc(2, GFP_KERNEL); | ||
749 | if (!buffer) | ||
750 | return -ENOMEM; | ||
751 | |||
752 | rv = usb_clear_halt(data->usb_dev, | 738 | rv = usb_clear_halt(data->usb_dev, |
753 | usb_rcvbulkpipe(data->usb_dev, data->bulk_in)); | 739 | usb_rcvbulkpipe(data->usb_dev, data->bulk_in)); |
754 | 740 | ||
755 | if (rv < 0) { | 741 | if (rv < 0) { |
756 | dev_err(&data->usb_dev->dev, "usb_control_msg returned %d\n", | 742 | dev_err(&data->usb_dev->dev, "usb_control_msg returned %d\n", |
757 | rv); | 743 | rv); |
758 | goto exit; | 744 | return rv; |
759 | } | 745 | } |
760 | rv = 0; | 746 | return 0; |
761 | |||
762 | exit: | ||
763 | kfree(buffer); | ||
764 | return rv; | ||
765 | } | 747 | } |
766 | 748 | ||
767 | static int get_capabilities(struct usbtmc_device_data *data) | 749 | static int get_capabilities(struct usbtmc_device_data *data) |