aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_phonet.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 02:08:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 02:08:32 -0400
commitf549953c15deab4c54708b39af86d4edecc6cddc (patch)
treef0412f989b77cdceab34c18aa85a8a25d5942a1f /drivers/usb/gadget/f_phonet.c
parentf0deb97ab13ad1f89cd0993f7339655d59788405 (diff)
parente04f5f7e423018bcec84c11af2058cdce87816f3 (diff)
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (115 commits) EHCI: fix direction handling for interrupt data toggles USB: serial: add IDs for WinChipHead USB->RS232 adapter USB: OHCI: fix another regression for NVIDIA controllers usb: gadget: m66592-udc: add pullup function usb: gadget: m66592-udc: add function for external controller usb: gadget: r8a66597-udc: add pullup function usb: renesas_usbhs: support multi driver usb: renesas_usbhs: inaccessible pipe is not an error usb: renesas_usbhs: care buff alignment when dma handler USB: PL2303: correctly handle baudrates above 115200 usb: r8a66597-hcd: fixup USB_PORT_STAT_C_SUSPEND shift usb: renesas_usbhs: compile/config are rescued usb: renesas_usbhs: fixup comment-out usb: update email address in ohci-sh and r8a66597-hcd usb: r8a66597-hcd: add function for external controller EHCI: only power off port if over-current is active USB: mon: Allow to use usbmon without debugfs USB: EHCI: go back to using the system clock for QH unlinks ehci: add pci quirk for Ordissimo and RM Slate 100 too ehci: refactor pci quirk to use standard dmi_check_system method ... Fix up trivial conflicts in Documentation/feature-removal-schedule.txt
Diffstat (limited to 'drivers/usb/gadget/f_phonet.c')
-rw-r--r--drivers/usb/gadget/f_phonet.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c
index f22fc685ddfd..8f8d3f6cd89e 100644
--- a/drivers/usb/gadget/f_phonet.c
+++ b/drivers/usb/gadget/f_phonet.c
@@ -428,17 +428,16 @@ static int pn_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
428 spin_lock(&port->lock); 428 spin_lock(&port->lock);
429 __pn_reset(f); 429 __pn_reset(f);
430 if (alt == 1) { 430 if (alt == 1) {
431 struct usb_endpoint_descriptor *out, *in;
432 int i; 431 int i;
433 432
434 out = ep_choose(gadget, 433 if (config_ep_by_speed(gadget, f, fp->in_ep) ||
435 &pn_hs_sink_desc, 434 config_ep_by_speed(gadget, f, fp->out_ep)) {
436 &pn_fs_sink_desc); 435 fp->in_ep->desc = NULL;
437 in = ep_choose(gadget, 436 fp->out_ep->desc = NULL;
438 &pn_hs_source_desc, 437 return -EINVAL;
439 &pn_fs_source_desc); 438 }
440 usb_ep_enable(fp->out_ep, out); 439 usb_ep_enable(fp->out_ep);
441 usb_ep_enable(fp->in_ep, in); 440 usb_ep_enable(fp->in_ep);
442 441
443 port->usb = fp; 442 port->usb = fp;
444 fp->out_ep->driver_data = fp; 443 fp->out_ep->driver_data = fp;