Skip to content

Commit

Permalink
drm/ssd130x: Print the PWM's label instead of its number
Browse files Browse the repository at this point in the history
struct pwm_device::pwm is a write-only variable in the pwm core and used
nowhere apart from this and another dev_dbg. So it isn't useful to
identify the used PWM. Emit the PWM's label instead in the debug
message.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230728145824.616687-2-u.kleine-koenig@pengutronix.de
  • Loading branch information
Uwe Kleine-König authored and Javier Martinez Canillas committed Sep 9, 2023
1 parent 775b066 commit 84f54d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/solomon/ssd130x.c
Original file line number Diff line number Diff line change
@@ -272,8 +272,8 @@ static int ssd130x_pwm_enable(struct ssd130x_device *ssd130x)
/* Enable the PWM */
pwm_enable(ssd130x->pwm);

dev_dbg(dev, "Using PWM%d with a %lluns period.\n",
ssd130x->pwm->pwm, pwm_get_period(ssd130x->pwm));
dev_dbg(dev, "Using PWM %s with a %lluns period.\n",
ssd130x->pwm->label, pwm_get_period(ssd130x->pwm));

return 0;
}

0 comments on commit 84f54d4

Please sign in to comment.