Skip to content

Commit

Permalink
fbdev: ssd1307fb: 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: Helge Deller <deller@gmx.de>
  • Loading branch information
Uwe Kleine-König authored and Helge Deller committed Jul 31, 2023
1 parent 0872b2c commit bc2e67a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/fbdev/ssd1307fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ static int ssd1307fb_init(struct ssd1307fb_par *par)
/* Enable the PWM */
pwm_enable(par->pwm);

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

/* Set initial contrast */
Expand Down

0 comments on commit bc2e67a

Please sign in to comment.