]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gpio: Use str_enable_disable-like helpers
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 14 Jan 2025 19:14:38 +0000 (20:14 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 3 Feb 2025 08:12:44 +0000 (09:12 +0100)
commitde454ac4fc5a117a4264e8bdf60fca58021574b1
tree58bc715af437e663ec49a62d9ece0cb66a465f19
parent2014c95afecee3e76ca4a56956a936e23283f05b
gpio: 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.

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Doug Berger <opendmb@gmail.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250114191438.857656-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-brcmstb.c
drivers/gpio/gpio-crystalcove.c
drivers/gpio/gpio-grgpio.c
drivers/gpio/gpio-mvebu.c
drivers/gpio/gpio-nomadik.c
drivers/gpio/gpio-stmpe.c
drivers/gpio/gpio-wcove.c
drivers/gpio/gpio-wm831x.c
drivers/gpio/gpio-xra1403.c
drivers/gpio/gpiolib.c