mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] pinctrl: starfive: jhb100: use str_enable_disable()
@ 2026-11-04 15:00 Aryan Sinha
  0 siblings, 0 replies; only message in thread
From: Aryan Sinha @ 2026-11-04 15:00 UTC (permalink / raw)
  To: Changhuang Liang, Lianfeng Ouyang
  Cc: Linus Walleij, linux-gpio, linux-kernel, Aryan Sinha

Replace the open coded ternary in the jhb100_irq_set_wake() function with the helper
from string_choices.h. Gives same output.

Signed-off-by: Aryan Sinha <sinha.aryan03@gmail.com>
---
 drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c b/drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c
index 462a26697..329153876 100644
--- a/drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c
+++ b/drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c
@@ -20,6 +20,7 @@
 #include <linux/seq_file.h>
 #include <linux/spinlock.h>
 #include <linux/string.h>
+#include <linux/string_choices.h>
 
 #include <linux/pinctrl/consumer.h>
 #include <linux/pinctrl/pinconf.h>
@@ -1152,7 +1153,7 @@ static int jhb100_irq_set_wake(struct irq_data *d, unsigned int enable)
 		ret = disable_irq_wake(sfp->irq);
 	if (ret)
 		dev_err(sfp->dev, "failed to %s wake-up interrupt\n",
-			enable ? "enable" : "disable");
+			str_enable_disable(enable));
 
 	return ret;
 }
-- 
2.46.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-04 15:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 15:00 [PATCH] pinctrl: starfive: jhb100: use str_enable_disable() Aryan Sinha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®