diff options
author | Tatyana Brokhman <tlinder@codeaurora.org> | 2011-06-28 17:33:50 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-28 22:14:37 +0400 |
commit | ea2a1df7b2b1de839a72217d85bfb4b7b049010c (patch) | |
tree | 89c10a2a18bba8a1d448b8b1f1281cf52b2287c6 /drivers/usb/gadget/f_loopback.c | |
parent | 48767a4e8263620c347c3fa17812c943dd0fc2fa (diff) | |
download | linux-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_loopback.c')
-rw-r--r-- | drivers/usb/gadget/f_loopback.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/usb/gadget/f_loopback.c b/drivers/usb/gadget/f_loopback.c index 34e3ccaf0884..375632659a03 100644 --- a/drivers/usb/gadget/f_loopback.c +++ b/drivers/usb/gadget/f_loopback.c @@ -256,8 +256,9 @@ enable_loopback(struct usb_composite_dev *cdev, struct f_loopback *loop) /* one endpoint writes data back IN to the host */ ep = loop->in_ep; - ep->desc = ep_choose(cdev->gadget, - &hs_loop_source_desc, &fs_loop_source_desc); + result = config_ep_by_speed(cdev->gadget, &(loop->function), ep); + if (result) + return result; result = usb_ep_enable(ep); if (result < 0) return result; @@ -265,8 +266,10 @@ enable_loopback(struct usb_composite_dev *cdev, struct f_loopback *loop) /* one endpoint just reads OUT packets */ ep = loop->out_ep; - ep->desc = ep_choose(cdev->gadget, - &hs_loop_sink_desc, &fs_loop_sink_desc); + result = config_ep_by_speed(cdev->gadget, &(loop->function), ep); + if (result) + goto fail0; + result = usb_ep_enable(ep); if (result < 0) { fail0: |