gpio: gpio-stmpe: Use str_hi_lo() helper in stmpe_dbg_show_one()
PATCH 1/1 gpio: gpio-stmpe: Use str_hi_lo() helper in stmpe_dbg_show_one()
Remove hard-coded strings by using str_hi_lo() helper function.
Signed-off-by Salah Triki <[email protected]>
--- drivers/gpio/gpio-stmpe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpio/gpio-stmpe.c +3 -3
@@ -15,7 +15,7 @@#include <linux/platform_device.h> #include <linux/seq_file.h> #include <linux/slab.h> - +#include <linux/string_choices.h> /* * These registers are modified under the irq bus lock and cached to avoid * unnecessary writes in bus_sync_unlock.
@@ -283,7 +283,7 @@ static void stmpe_dbg_show_one(struct seq_file *s,if (dir) {seq_printf (s," gpio-%-3d (%-20.20s) out %s" , gpio, label ?:"(none)" , - val ?"hi" :"lo" ); +str_hi_lo (val)); }else {u8 edge_det_reg;u8 rise_reg;
@@ -352,7 +352,7 @@ static void stmpe_dbg_show_one(struct seq_file *s, seq_printf(s, " gpio-%-3d (%-20.20s) in %s %13s %13s %25s %25s", gpio, label ?: "(none)", - val ? "hi" : "lo", + str_hi_lo(val), edge_det_values[edge_det], irqen ? "IRQ-enabled" : "IRQ-disabled", rise_values[rise],
Signature · 1 line
2.34.1
Quoted 5 lines · Salah Triki
Remove hard-coded strings by using
str_hi_lo()helper function.Signed-off-by Salah Triki <[email protected]>---
This no longer applies, can you resend it rebased on top of current gpio/for-next?
Bart