From: Aryan Sinha <sinha.aryan03@gmail.com>
To: Changhuang Liang <changhuang.liang@starfivetech.com>,
Lianfeng Ouyang <lianfeng.ouyang@starfivetech.com>
Cc: Linus Walleij <linusw@kernel.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Aryan Sinha <sinha.aryan03@gmail.com>
Subject: [PATCH] pinctrl: starfive: jhb100: use str_enable_disable()
Date: Wed, 4 Nov 2026 20:30:08 +0530 [thread overview]
Message-ID: <20261104150013.32879-1-sinha.aryan03@gmail.com> (raw)
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
next reply other threads:[~2026-11-04 15:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 15:00 Aryan Sinha [this message]
2026-11-05 0:58 ` Changhuang Liang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261104150013.32879-1-sinha.aryan03@gmail.com \
--to=sinha.aryan03@gmail.com \
--cc=changhuang.liang@starfivetech.com \
--cc=lianfeng.ouyang@starfivetech.com \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®