summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/f_sourcesink.c
diff options
context:
space:
mode:
authorTatyana Brokhman <tlinder@codeaurora.org>2011-06-28 17:33:50 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-28 22:14:37 +0400
commitea2a1df7b2b1de839a72217d85bfb4b7b049010c (patch)
tree89c10a2a18bba8a1d448b8b1f1281cf52b2287c6 /drivers/usb/gadget/f_sourcesink.c
parent48767a4e8263620c347c3fa17812c943dd0fc2fa (diff)
downloadlinux-ea2a1df7b2b1de839a72217d85bfb4b7b049010c.tar.xz
usb: gadget: use config_ep_by_speed() instead of ep_choose()
Remove obsolete functions: 1. ep_choose() 2. usb_find_endpoint() Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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;