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>
This commit is contained in:
Tatyana Brokhman
2011-06-28 16:33:50 +03:00
committed by Ido Shayevitz
parent e2a9f931cc
commit ebd3f395ba
29 changed files with 411 additions and 496 deletions

View File

@@ -148,21 +148,6 @@ int usb_interface_id(struct usb_configuration *, struct usb_function *);
int config_ep_by_speed(struct usb_gadget *g, struct usb_function *f,
struct usb_ep *_ep);
/**
* ep_choose - select descriptor endpoint at current device speed
* @g: gadget, connected and running at some speed
* @hs: descriptor to use for high speed operation
* @fs: descriptor to use for full or low speed operation
*/
static inline struct usb_endpoint_descriptor *
ep_choose(struct usb_gadget *g, struct usb_endpoint_descriptor *hs,
struct usb_endpoint_descriptor *fs)
{
if (gadget_is_dualspeed(g) && g->speed == USB_SPEED_HIGH)
return hs;
return fs;
}
#define MAX_CONFIG_INTERFACES 16 /* arbitrary; max 255 */
/**