Message ID | 20230306195556.55475-10-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers | show |
Series | gpio: Use string_choices.h | expand |
diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c index bea0e32c195d..ccd942109f6a 100644 --- a/drivers/gpio/gpio-grgpio.c +++ b/drivers/gpio/gpio-grgpio.c @@ -30,6 +30,7 @@ #include <linux/irq.h> #include <linux/irqdomain.h> #include <linux/bitops.h> +#include <linux/string_choices.h> #define GRGPIO_MAX_NGPIO 32 @@ -426,7 +427,7 @@ static int grgpio_probe(struct platform_device *ofdev) } dev_info(&ofdev->dev, "regs=0x%p, base=%d, ngpio=%d, irqs=%s\n", - priv->regs, gc->base, gc->ngpio, priv->domain ? "on" : "off"); + priv->regs, gc->base, gc->ngpio, str_on_off(priv->domain)); return 0; }
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-grgpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)