diff options
author | Matthew Garrett <mjg@redhat.com> | 2010-02-17 16:39:44 -0500 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-03-16 15:47:54 -0400 |
commit | a19a6ee6cad2b20292a774c2f56ba8039b0fac9c (patch) | |
tree | 631916ce6181336c5c28eb0cf5484c40c92986b6 /drivers/video/bfin-t350mcqb-fb.c | |
parent | 57e148b6a975980944f4466ccb669b1d02dfc6a1 (diff) |
backlight: Allow properties to be passed at registration
Values such as max_brightness should be set before backlights are
registered, but the current API doesn't allow that. Add a parameter to
backlight_device_register and update drivers to ensure that they
set this correctly.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'drivers/video/bfin-t350mcqb-fb.c')
-rw-r--r-- | drivers/video/bfin-t350mcqb-fb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c index 5653d083a983..3a8e811a7e9f 100644 --- a/drivers/video/bfin-t350mcqb-fb.c +++ b/drivers/video/bfin-t350mcqb-fb.c | |||
@@ -419,6 +419,7 @@ static irqreturn_t bfin_t350mcqb_irq_error(int irq, void *dev_id) | |||
419 | 419 | ||
420 | static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev) | 420 | static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev) |
421 | { | 421 | { |
422 | struct backlight_properties props; | ||
422 | struct bfin_t350mcqbfb_info *info; | 423 | struct bfin_t350mcqbfb_info *info; |
423 | struct fb_info *fbinfo; | 424 | struct fb_info *fbinfo; |
424 | int ret; | 425 | int ret; |
@@ -540,10 +541,10 @@ static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev) | |||
540 | goto out8; | 541 | goto out8; |
541 | } | 542 | } |
542 | #ifndef NO_BL_SUPPORT | 543 | #ifndef NO_BL_SUPPORT |
543 | bl_dev = | 544 | memset(&props, 0, sizeof(struct backlight_properties)); |
544 | backlight_device_register("bf52x-bl", NULL, NULL, | 545 | props.max_brightness = 255; |
545 | &bfin_lq043fb_bl_ops); | 546 | bl_dev = backlight_device_register("bf52x-bl", NULL, NULL, |
546 | bl_dev->props.max_brightness = 255; | 547 | &bfin_lq043fb_bl_ops, &props); |
547 | 548 | ||
548 | lcd_dev = lcd_device_register(DRIVER_NAME, NULL, &bfin_lcd_ops); | 549 | lcd_dev = lcd_device_register(DRIVER_NAME, NULL, &bfin_lcd_ops); |
549 | lcd_dev->props.max_contrast = 255, printk(KERN_INFO "Done.\n"); | 550 | lcd_dev->props.max_contrast = 255, printk(KERN_INFO "Done.\n"); |