aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2011-11-18 20:16:27 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-29 23:19:03 +0900
commitfef6964452abae55c82e1615ac505b8377df00e9 (patch)
tree6356cc0c3ab075dc4575a6b941cd830d6576c33a /drivers
parent89f829a50f7d0d0f3a15c482a7a65dd0b133a5f5 (diff)
usb: gadget: fix g_serial regression
Commit "usb: gadget: use config_ep_by_speed() instead of ep_choose()" broke g_serial in "non ACM nor OBEX" mode. Apply a trivial fix on usb endpoints discovery. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/f_serial.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_serial.c b/drivers/usb/gadget/f_serial.c
index 91fdf790ed2..cf33a8d0fd5 100644
--- a/drivers/usb/gadget/f_serial.c
+++ b/drivers/usb/gadget/f_serial.c
@@ -131,8 +131,8 @@ static int gser_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
}
if (!gser->port.in->desc || !gser->port.out->desc) {
DBG(cdev, "activate generic ttyGS%d\n", gser->port_num);
- if (!config_ep_by_speed(cdev->gadget, f, gser->port.in) ||
- !config_ep_by_speed(cdev->gadget, f, gser->port.out)) {
+ if (config_ep_by_speed(cdev->gadget, f, gser->port.in) ||
+ config_ep_by_speed(cdev->gadget, f, gser->port.out)) {
gser->port.in->desc = NULL;
gser->port.out->desc = NULL;
return -EINVAL;