summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_sourcesink.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/f_sourcesink.c')
-rw-r--r--drivers/usb/gadget/f_sourcesink.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_sourcesink.c b/drivers/usb/gadget/f_sourcesink.c
index 0ffddd33a55c..caf2f95e0346 100644
--- a/drivers/usb/gadget/f_sourcesink.c
+++ b/drivers/usb/gadget/f_sourcesink.c
@@ -347,7 +347,9 @@ enable_source_sink(struct usb_composite_dev *cdev, struct f_sourcesink *ss)
/* one endpoint writes (sources) zeroes IN (to the host) */
ep = ss->in_ep;
- ep->desc = ep_choose(cdev->gadget, &hs_source_desc, &fs_source_desc);
+ result = config_ep_by_speed(cdev->gadget, &(ss->function), ep);
+ if (result)
+ return result;
result = usb_ep_enable(ep);
if (result < 0)
return result;
@@ -364,7 +366,9 @@ fail:
/* one endpoint reads (sinks) anything OUT (from the host) */
ep = ss->out_ep;
- ep->desc = ep_choose(cdev->gadget, &hs_sink_desc, &fs_sink_desc);
+ result = config_ep_by_speed(cdev->gadget, &(ss->function), ep);
+ if (result)
+ goto fail;
result = usb_ep_enable(ep);
if (result < 0)
goto fail;
OpenPOWER on IntegriCloud