diff options
author | Eric Miao <eric.y.miao@gmail.com> | 2009-02-10 00:30:37 -0500 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-04-06 11:06:55 -0400 |
commit | b8cdd877f2cbcc07b5a287b7273a8eaa4c11ad04 (patch) | |
tree | b5647a9b6ce0fed72f19484323ec2054822d3a65 /drivers/video/backlight/pwm_bl.c | |
parent | 1a468ba10c3bdbc25ef7aa7fecda20ee27007bdf (diff) |
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.
Signed-off-by: Peter Edwards <sweetlilmre@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'drivers/video/backlight/pwm_bl.c')
-rw-r--r-- | drivers/video/backlight/pwm_bl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index ea07258565f0..e641584e212e 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * simple PWM based backlight control, board code has to setup | 4 | * simple PWM based backlight control, board code has to setup |
5 | * 1) pin configuration so PWM waveforms can output | 5 | * 1) pin configuration so PWM waveforms can output |
6 | * 2) platform_data casts to the PWM id (0/1/2/3 on PXA) | 6 | * 2) platform_data being correctly configured |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
@@ -97,7 +97,7 @@ static int pwm_backlight_probe(struct platform_device *pdev) | |||
97 | } else | 97 | } else |
98 | dev_dbg(&pdev->dev, "got pwm for backlight\n"); | 98 | dev_dbg(&pdev->dev, "got pwm for backlight\n"); |
99 | 99 | ||
100 | bl = backlight_device_register(pdev->name, &pdev->dev, | 100 | bl = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, |
101 | pb, &pwm_backlight_ops); | 101 | pb, &pwm_backlight_ops); |
102 | if (IS_ERR(bl)) { | 102 | if (IS_ERR(bl)) { |
103 | dev_err(&pdev->dev, "failed to register backlight\n"); | 103 | dev_err(&pdev->dev, "failed to register backlight\n"); |