summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_phonet.c
diff options
context:
space:
mode:
authorTatyana Brokhman <tlinder@codeaurora.org>2011-06-28 15:33:50 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-28 20:14:37 +0200
commitea2a1df7b2b1de839a72217d85bfb4b7b049010c (patch)
tree89c10a2a18bba8a1d448b8b1f1281cf52b2287c6 /drivers/usb/gadget/f_phonet.c
parentusb: gadget: configure endpoint according to gadget speed (diff)
downloadlinux-ea2a1df7b2b1de839a72217d85bfb4b7b049010c.tar.xz
linux-ea2a1df7b2b1de839a72217d85bfb4b7b049010c.zip
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_phonet.c')
-rw-r--r--drivers/usb/gadget/f_phonet.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c
index dc63f161a10a..0d6d26090da9 100644
--- a/drivers/usb/gadget/f_phonet.c
+++ b/drivers/usb/gadget/f_phonet.c
@@ -429,12 +429,12 @@ static int pn_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
if (alt == 1) {
int i;
- fp->out_ep->desc = ep_choose(gadget,
- &pn_hs_sink_desc,
- &pn_fs_sink_desc);
- fp->in_ep->desc = ep_choose(gadget,
- &pn_hs_source_desc,
- &pn_fs_source_desc);
+ if (config_ep_by_speed(gadget, f, fp->in_ep) ||
+ config_ep_by_speed(gadget, f, fp->out_ep)) {
+ fp->in_ep->desc = NULL;
+ fp->out_ep->desc = NULL;
+ return -EINVAL;
+ }
usb_ep_enable(fp->out_ep);
usb_ep_enable(fp->in_ep);