• Michal Nazarewicz's avatar
    USB: gadget: g_fs: code cleanup · f8dae531
    Michal Nazarewicz authored
    This commit cleans the g_fs gadget hopefully making it more
    readable.  This is achieved by usage of the usb_string_ids_tab()
    function for batch string IDs registration as well as
    generalising configuration so that a single routine is
    used to add each configuration and bind interfaces.  As an
    effect, the code is shorter and has fewer #ifdefs.
    
    Moreover, in some circumstances previous code #defined
    CONFIG_USB_FUNCTIONFS_GENERIC macro to prevent a situation
    where gadget with no configurations is built.  This code removes
    the #define form source code and achieves the same effect using
    select in Kconfig.
    
    This patch also changes wording and names of the Kconfig options.
    Signed-off-by: default avatarMichal Nazarewicz <m.nazarewicz@samsung.com>
    Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    f8dae531
g_ffs.c 8.67 KB