aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/bfin-t350mcqb-fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/bfin-t350mcqb-fb.c')
-rw-r--r--drivers/video/bfin-t350mcqb-fb.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c
index 5653d083a983..31a2dec927bb 100644
--- a/drivers/video/bfin-t350mcqb-fb.c
+++ b/drivers/video/bfin-t350mcqb-fb.c
@@ -352,7 +352,7 @@ static int bl_get_brightness(struct backlight_device *bd)
352 return 0; 352 return 0;
353} 353}
354 354
355static struct backlight_ops bfin_lq043fb_bl_ops = { 355static const struct backlight_ops bfin_lq043fb_bl_ops = {
356 .get_brightness = bl_get_brightness, 356 .get_brightness = bl_get_brightness,
357}; 357};
358 358
@@ -419,6 +419,7 @@ static irqreturn_t bfin_t350mcqb_irq_error(int irq, void *dev_id)
419 419
420static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev) 420static 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,16 @@ 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);
548 if (IS_ERR(bl_dev)) {
549 printk(KERN_ERR DRIVER_NAME
550 ": unable to register backlight.\n");
551 ret = -EINVAL;
552 goto out9;
553 }
547 554
548 lcd_dev = lcd_device_register(DRIVER_NAME, NULL, &bfin_lcd_ops); 555 lcd_dev = lcd_device_register(DRIVER_NAME, NULL, &bfin_lcd_ops);
549 lcd_dev->props.max_contrast = 255, printk(KERN_INFO "Done.\n"); 556 lcd_dev->props.max_contrast = 255, printk(KERN_INFO "Done.\n");
@@ -551,6 +558,8 @@ static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev)
551 558
552 return 0; 559 return 0;
553 560
561out9:
562 unregister_framebuffer(fbinfo);
554out8: 563out8:
555 free_irq(info->irq, info); 564 free_irq(info->irq, info);
556out7: 565out7: