]> www.infradead.org Git - users/jedix/linux-maple.git/commit
USB: gadget: Use str_enable_disable-like helpers
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 14 Jan 2025 20:05:38 +0000 (21:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jan 2025 17:28:13 +0000 (18:28 +0100)
commit5b6dc50e9ed870fffbf2ae6de77b30fb0d15eab8
tree04f6e6277c0d536821d6f6218ff49c6ca3cd0e87
parent2d913c1b0cac0aeacc20870000ff3cddb040e69a
USB: gadget: Use str_enable_disable-like helpers

Replace ternary (condition ? "enable" : "disable") syntax with helpers
from string_choices.h because:
1. Simple function call with one argument is easier to read.  Ternary
   operator has three arguments and with wrapping might lead to quite
   long code.
2. Is slightly shorter thus also easier to read.
3. It brings uniformity in the text - same string.
4. Allows deduping by the linker, which results in a smaller binary
   file.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250114-str-enable-disable-usb-v1-5-c8405df47c19@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_ecm.c
drivers/usb/gadget/function/f_ncm.c
drivers/usb/gadget/function/u_serial.c
drivers/usb/gadget/legacy/inode.c
drivers/usb/gadget/udc/aspeed-vhub/hub.c
drivers/usb/gadget/udc/at91_udc.c
drivers/usb/gadget/udc/cdns2/cdns2-gadget.c
drivers/usb/gadget/udc/dummy_hcd.c
drivers/usb/gadget/udc/fsl_udc_core.c
drivers/usb/gadget/udc/omap_udc.c
drivers/usb/gadget/udc/pxa27x_udc.c