• R
    usb: gadget: introduce 'enabled' flag in struct usb_ep · b0bac258
    Robert Baldyga 提交于
    This patch introduces 'enabled' flag in struct usb_ep, and modifies
    usb_ep_enable() and usb_ep_disable() functions to encapsulate endpoint
    enabled/disabled state. It helps to avoid enabling endpoints which are
    already enabled, and disabling endpoints which are already disables.
    
    From now USB functions don't have to remember current endpoint
    enable/disable state, as this state is now handled automatically which
    makes this API less bug-prone.
    Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
    Signed-off-by: NFelipe Balbi <balbi@ti.com>
    b0bac258
gadget.h 45.0 KB