[PATCH] backlight: fix pwm_bl.c when multiple PWM backlights exist

From: Eric Miao
Date: Tue Feb 10 2009 - 00:31:49 EST



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.

Signed-off-by: Peter Edwards <sweetlilmre@xxxxxxxxx>
Signed-off-by: Eric Miao <eric.miao@xxxxxxxxxxx>
---
drivers/video/backlight/pwm_bl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index ea07258..cd8beba 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -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");
--
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/