• David Brownell's avatar
    USB: gadget: gadget_is_{dualspeed,otg} predicates and cleanup · a4e3ef55
    David Brownell authored
    This adds two small inlines to the gadget stack, which will
    often evaluate to compile-time constants.  That can help
    shrink object code and remove #ifdeffery.
    
     - gadget_is_dualspeed(), currently always a compile-time
       constant (depending on which controller is selected).
    
     - gadget_is_otg(), usually a compile time "false", but this
       is a runtime test if the platform enables OTG (since it's
       reasonable to populate boards with different USB sockets).
    
    It also updates two peripheral controller drivers to use these:
    
     - fsl_usb2_udc, mostly OTG-related bugfixes:  non-OTG devices
       must follow the rules about drawing VBUS power, and OTG ones
       need to reject invalid SET_FEATURE requests.
    
     - omap_udc, just scrubbing a bit of #ifdeffery.
    
    And also gadgetfs, which lost some #ifdefs and moved to a more
    standard handling of DEBUG and VERBOSE_DEBUG.
    
    The main benefits come from patches which will follow.
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    a4e3ef55
inode.c 52.6 KB