[PATCH v1 15/16] gpio: wm8994: Utilize helpers from string_choices.h

Andy Shevchenko
2023-03-06T19:56:49Z

drivers/gpio/gpio-wm8994.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-wm8994.c b/drivers/gpio/gpio-wm8994.c
index f4a474cef32d..15757d94448a 100644
--- a/drivers/gpio/gpio-wm8994.c
+++ b/drivers/gpio/gpio-wm8994.c
@@ -16,6 +16,7 @@
#include <linux/platform_device.h>
#include <linux/seq_file.h>
#include <linux/regmap.h>
+#include <linux/string_choices.h>

#include <linux/mfd/wm8994/core.h>
#include <linux/mfd/wm8994/pdata.h>
@@ -215,10 +216,7 @@ static void wm8994_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
continue;
}

- if (reg & WM8994_GPN_DIR)
- seq_printf(s, "in ");
- else
- seq_printf(s, "out ");
+ seq_printf(s, "%s ", str_in_out(reg & WM8994_GPN_DIR));

if (reg & WM8994_GPN_PU)
seq_printf(s, "pull up ");
--
2.39.1