aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/bf54x-lq043fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/bf54x-lq043fb.c')
-rw-r--r--drivers/video/bf54x-lq043fb.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
index 814312a7452f..23b2a8c0dbfc 100644
--- a/drivers/video/bf54x-lq043fb.c
+++ b/drivers/video/bf54x-lq043fb.c
@@ -433,7 +433,7 @@ static int bl_get_brightness(struct backlight_device *bd)
433 return 0; 433 return 0;
434} 434}
435 435
436static struct backlight_ops bfin_lq043fb_bl_ops = { 436static const struct backlight_ops bfin_lq043fb_bl_ops = {
437 .get_brightness = bl_get_brightness, 437 .get_brightness = bl_get_brightness,
438}; 438};
439 439
@@ -501,6 +501,7 @@ static irqreturn_t bfin_bf54x_irq_error(int irq, void *dev_id)
501 501
502static int __devinit bfin_bf54x_probe(struct platform_device *pdev) 502static int __devinit bfin_bf54x_probe(struct platform_device *pdev)
503{ 503{
504 struct backlight_properties props;
504 struct bfin_bf54xfb_info *info; 505 struct bfin_bf54xfb_info *info;
505 struct fb_info *fbinfo; 506 struct fb_info *fbinfo;
506 int ret; 507 int ret;
@@ -645,10 +646,16 @@ static int __devinit bfin_bf54x_probe(struct platform_device *pdev)
645 goto out8; 646 goto out8;
646 } 647 }
647#ifndef NO_BL_SUPPORT 648#ifndef NO_BL_SUPPORT
648 bl_dev = 649 memset(&props, 0, sizeof(struct backlight_properties));
649 backlight_device_register("bf54x-bl", NULL, NULL, 650 props.max_brightness = 255;
650 &bfin_lq043fb_bl_ops); 651 bl_dev = backlight_device_register("bf54x-bl", NULL, NULL,
651 bl_dev->props.max_brightness = 255; 652 &bfin_lq043fb_bl_ops, &props);
653 if (IS_ERR(bl_dev)) {
654 printk(KERN_ERR DRIVER_NAME
655 ": unable to register backlight.\n");
656 ret = -EINVAL;
657 goto out9;
658 }
652 659
653 lcd_dev = lcd_device_register(DRIVER_NAME, &pdev->dev, NULL, &bfin_lcd_ops); 660 lcd_dev = lcd_device_register(DRIVER_NAME, &pdev->dev, NULL, &bfin_lcd_ops);
654 lcd_dev->props.max_contrast = 255, printk(KERN_INFO "Done.\n"); 661 lcd_dev->props.max_contrast = 255, printk(KERN_INFO "Done.\n");
@@ -656,6 +663,8 @@ static int __devinit bfin_bf54x_probe(struct platform_device *pdev)
656 663
657 return 0; 664 return 0;
658 665
666out9:
667 unregister_framebuffer(fbinfo);
659out8: 668out8:
660 free_irq(info->irq, info); 669 free_irq(info->irq, info);
661out7: 670out7: