[PATCH v1 11/16] gpio: pl061: Utilize helpers from string_choices.h
Andy Shevchenko
andriy.shevchenko at linux.intel.com
Mon Mar 6 11:55:51 PST 2023
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 at linux.intel.com>
---
drivers/gpio/gpio-pl061.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
index 9fc1f3dd4190..99e71b4490a1 100644
--- a/drivers/gpio/gpio-pl061.c
+++ b/drivers/gpio/gpio-pl061.c
@@ -25,6 +25,7 @@
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
+#include <linux/string_choices.h>
#define GPIODIR 0x400
#define GPIOIS 0x404
@@ -165,8 +166,7 @@ static int pl061_irq_type(struct irq_data *d, unsigned trigger)
gpioiev &= ~bit;
irq_set_handler_locked(d, handle_level_irq);
dev_dbg(gc->parent, "line %d: IRQ on %s level\n",
- offset,
- polarity ? "HIGH" : "LOW");
+ offset, str_high_low(polarity));
} else if ((trigger & IRQ_TYPE_EDGE_BOTH) == IRQ_TYPE_EDGE_BOTH) {
/* Disable level detection */
gpiois &= ~bit;
--
2.39.1
More information about the linux-arm-kernel
mailing list