[PATCH] pwm: use str_plural() to simplify the code
From: Xichao Zhao
Date: Mon Aug 18 2025 - 04:37:04 EST
Use the string choice helper function str_plural() to simplify the code.
Signed-off-by: Xichao Zhao <zhao.xichao@xxxxxxxx>
---
drivers/pwm/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 0d66376a83ec..732d22dee035 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -2620,7 +2620,7 @@ static int pwm_seq_show(struct seq_file *s, void *v)
(char *)s->private, chip->id,
pwmchip_parent(chip)->bus ? pwmchip_parent(chip)->bus->name : "no-bus",
dev_name(pwmchip_parent(chip)), chip->npwm,
- (chip->npwm != 1) ? "s" : "");
+ str_plural(chip->npwm));
pwm_dbg_show(chip, s);
--
2.34.1