diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2025-02-05 13:29:36 +0200 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-02-11 09:45:30 +0100 |
commit | 5f05e9194ada5609edbefb542c0dbfdbae984958 (patch) | |
tree | 105200766f3649e0b6f62bb47bface443fe635c7 | |
parent | 5892cfc7db9814a71c991da7024fa03384e48924 (diff) |
gpiolib: Even more opportunities to use str_high_low() helper
The one of previous changes modified the library code to use
helpers from string_choices.h. Nevertheless it misses more
opportunities to convert the code. Here is the second part
of the conversion.
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250205112936.575493-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-rw-r--r-- | drivers/gpio/gpiolib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index be33515835089..618fe2eebf380 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -4712,10 +4712,10 @@ int gpiod_hog(struct gpio_desc *desc, const char *name, return ret; } - gpiod_dbg(desc, "hogged as %s%s\n", + gpiod_dbg(desc, "hogged as %s/%s\n", (dflags & GPIOD_FLAGS_BIT_DIR_OUT) ? "output" : "input", (dflags & GPIOD_FLAGS_BIT_DIR_OUT) ? - (dflags & GPIOD_FLAGS_BIT_DIR_VAL) ? "/high" : "/low" : ""); + str_high_low(dflags & GPIOD_FLAGS_BIT_DIR_VAL) : "?"); return 0; } |