pwm: Simplify printf to emit chip->npwm in $debugfs/pwm

Instead of caring to correctly pluralize "PWM device(s)" using

	(chip->npwm != 1) ? "s" : ""

or

	str_plural(chip->npwm)

just simplify the format to not need a plural-s.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20250926165702.321514-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
This commit is contained in:
Uwe Kleine-König 2025-09-26 18:57:03 +02:00 committed by Uwe Kleine-König
parent f84fd5bec5
commit 3cf8e55894
1 changed files with 2 additions and 3 deletions

View File

@ -2696,11 +2696,10 @@ static int pwm_seq_show(struct seq_file *s, void *v)
{ {
struct pwm_chip *chip = v; struct pwm_chip *chip = v;
seq_printf(s, "%s%d: %s/%s, %d PWM device%s\n", seq_printf(s, "%s%d: %s/%s, npwm: %d\n",
(char *)s->private, chip->id, (char *)s->private, chip->id,
pwmchip_parent(chip)->bus ? pwmchip_parent(chip)->bus->name : "no-bus", pwmchip_parent(chip)->bus ? pwmchip_parent(chip)->bus->name : "no-bus",
dev_name(pwmchip_parent(chip)), chip->npwm, dev_name(pwmchip_parent(chip)), chip->npwm);
(chip->npwm != 1) ? "s" : "");
pwm_dbg_show(chip, s); pwm_dbg_show(chip, s);