diff mbox series

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

Message ID 20230306195556.55475-16-andriy.shevchenko@linux.intel.com
State New
Headers show
Series gpio: Use string_choices.h | expand

Commit Message

Andy Shevchenko March 6, 2023, 7:55 p.m. UTC
There are a few helpers available to convert a boolean variable
to the dedicated string literals depending on the application.
Use them in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpio-wm8994.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

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 ");