[PATCH v2] arm: omap1: use string choices helper
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Tue Jun 17 16:41:30 PDT 2025
We can use string choices helper, let's use it.
It updates format
- ..."%sabled", ...? "dis" : "en",
+ ..."%s", ... str_disabled_enabled(...)
^^^^^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
Reviewed-by: Andy Shevchenko <andy at kernel.org>
---
v1 -> v2
- add commit message
- add Reviewed-by
arch/arm/mach-omap1/board-ams-delta.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 0daf6c5b5c1c..2e1c235303e5 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -761,8 +761,8 @@ static void modem_pm(struct uart_port *port, unsigned int state, unsigned old)
if (ret)
dev_warn(port->dev,
- "ams_delta modem_pm: failed to %sable regulator: %d\n",
- state ? "dis" : "en", ret);
+ "ams_delta modem_pm: failed to %s regulator: %d\n",
+ str_disable_enable(state), ret);
}
static struct plat_serial8250_port ams_delta_modem_ports[] = {
--
2.43.0
More information about the linux-arm-kernel
mailing list