Skip to contentSkip to conversation

backlight: fix pwm_bl.c when multiple PWM backlights exist

PATCH New Eric Miao 1 participant 1 message Feb 10, 2009

Subsystems (2)
lore
Share & tools
lore

Eric Miao

author
#0 lore raw

PATCH 1/1 backlight: fix pwm_bl.c when multiple PWM backlights exist

When multiple PWMs are used as backlights, the current code uses pdev->name as the backlight name when registering, which will be conflicting, use dev_name() instead.

---
 drivers/video/backlight/pwm_bl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/backlight/pwm_bl.c +1 -1
index ea07258..cd8beba 100644
@@ -97,7 +97,7 @@ static int pwm_backlight_probe(struct platform_device *pdev)
 	} else
 		dev_dbg(&pdev->dev, "got pwm for backlight\n");
 
-	bl = backlight_device_register(pdev->name, &pdev->dev,
+	bl = backlight_device_register(dev_name(&pdev->dev), &pdev->dev,
 			pb, &pwm_backlight_ops);
 	if (IS_ERR(bl)) {
 		dev_err(&pdev->dev, "failed to register backlight\n");
Signature · 1 line
1.6.0.4