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>
[idos@codeaurora.org: Changed also the following files to
comply with this commit: f_accessory.c,f_adb.c,f_diag.c,f_mtp.c,
f_rmnet.c,f_rmnet_sdio,f_rmnet_smd,f_rmnet_smd_sdio,f_serial.f_ccid.c.
Also merged a patch in f_serial.c for correct checking of the return value
of config_ep_by_speed. See "usb: gadget: fix g_serial regression".
Also fix a bug in ci13xxx_udc. Since f_serial is now checking if the endpoint
descriptors are null in the set_alt function, need to set them to null on
ep_disable in case of cable disconnect. Since the ep descriptor was inserted
to struct usb_ep in "usb: gadget: add usb_endpoint_descriptor to struct usb_ep"
then simply convert the ci13xxx_udc to work with mEp->ep.desc instead of
mEp->desc, this will ensure that the correct descriptor will be cleared
on endpoint disable.
I will upstream it to Linux community soon, I will name it:
"usb: gadget: use usb ep descriptor of struct usb_ep instead of wrapper desc"]
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
29 files changed