aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/pwm_bl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-18 16:48:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-18 16:48:00 -0700
commit61d718076e95eb461fd4c3692b702a82e2be0df4 (patch)
tree7c5d489840c85692bf2d14eda120cb0cb0e673c0 /drivers/video/backlight/pwm_bl.c
parentMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds (diff)
parentbacklight: panasonic-laptop - Fix incomplete registration failure handling (diff)
downloadlinux-dev-61d718076e95eb461fd4c3692b702a82e2be0df4.tar.xz
linux-dev-61d718076e95eb461fd4c3692b702a82e2be0df4.zip
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight: backlight: panasonic-laptop - Fix incomplete registration failure handling backlight: msi-laptop, msi-wmi: fix incomplete registration failure handling backlight: blackfin - Fix missing registration failure handling backlight: classmate-laptop - Fix missing registration failure handling backlight: mbp_nvidia_bl - add five more MacBook variants backlight: Allow properties to be passed at registration backlight: Add backlight_device parameter to check_fb video: backlight/progear, fix pci device refcounting backlight: l4f00242t03: Fix module licence absence. backlight: Revert some const qualifiers backlight: Add Epson L4F00242T03 LCD driver
Diffstat (limited to 'drivers/video/backlight/pwm_bl.c')
-rw-r--r--drivers/video/backlight/pwm_bl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 9d2ec2a1cce8..b89eebc3f77d 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -65,6 +65,7 @@ static const struct backlight_ops pwm_backlight_ops = {
static int pwm_backlight_probe(struct platform_device *pdev)
{
+ struct backlight_properties props;
struct platform_pwm_backlight_data *data = pdev->dev.platform_data;
struct backlight_device *bl;
struct pwm_bl_data *pb;
@@ -100,15 +101,16 @@ static int pwm_backlight_probe(struct platform_device *pdev)
} else
dev_dbg(&pdev->dev, "got pwm for backlight\n");
- bl = backlight_device_register(dev_name(&pdev->dev), &pdev->dev,
- pb, &pwm_backlight_ops);
+ memset(&props, 0, sizeof(struct backlight_properties));
+ props.max_brightness = data->max_brightness;
+ bl = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, pb,
+ &pwm_backlight_ops, &props);
if (IS_ERR(bl)) {
dev_err(&pdev->dev, "failed to register backlight\n");
ret = PTR_ERR(bl);
goto err_bl;
}
- bl->props.max_brightness = data->max_brightness;
bl->props.brightness = data->dft_brightness;
backlight_update_status(bl);