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