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.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
index dc2f0047769b..ff5663f5c64f 100644
--- a/drivers/video/bf54x-lq043fb.c
+++ b/drivers/video/bf54x-lq043fb.c
@@ -525,6 +525,7 @@ static int __devinit bfin_bf54x_probe(struct platform_device *pdev)
525 info = fbinfo->par; 525 info = fbinfo->par;
526 info->fb = fbinfo; 526 info->fb = fbinfo;
527 info->dev = &pdev->dev; 527 info->dev = &pdev->dev;
528 spin_lock_init(&info->lock);
528 529
529 platform_set_drvdata(pdev, fbinfo); 530 platform_set_drvdata(pdev, fbinfo);
530 531
@@ -601,7 +602,8 @@ static int __devinit bfin_bf54x_probe(struct platform_device *pdev)
601 602
602 fbinfo->fbops = &bfin_bf54x_fb_ops; 603 fbinfo->fbops = &bfin_bf54x_fb_ops;
603 604
604 fbinfo->pseudo_palette = kzalloc(sizeof(u32) * 16, GFP_KERNEL); 605 fbinfo->pseudo_palette = devm_kzalloc(&pdev->dev, sizeof(u32) * 16,
606 GFP_KERNEL);
605 if (!fbinfo->pseudo_palette) { 607 if (!fbinfo->pseudo_palette) {
606 printk(KERN_ERR DRIVER_NAME 608 printk(KERN_ERR DRIVER_NAME
607 "Fail to allocate pseudo_palette\n"); 609 "Fail to allocate pseudo_palette\n");
@@ -616,7 +618,7 @@ static int __devinit bfin_bf54x_probe(struct platform_device *pdev)
616 "Fail to allocate colormap (%d entries)\n", 618 "Fail to allocate colormap (%d entries)\n",
617 BFIN_LCD_NBR_PALETTE_ENTRIES); 619 BFIN_LCD_NBR_PALETTE_ENTRIES);
618 ret = -EFAULT; 620 ret = -EFAULT;
619 goto out5; 621 goto out4;
620 } 622 }
621 623
622 if (request_ports(info)) { 624 if (request_ports(info)) {
@@ -671,8 +673,6 @@ out7:
671 free_ports(info); 673 free_ports(info);
672out6: 674out6:
673 fb_dealloc_cmap(&fbinfo->cmap); 675 fb_dealloc_cmap(&fbinfo->cmap);
674out5:
675 kfree(fbinfo->pseudo_palette);
676out4: 676out4:
677 dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer, 677 dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer,
678 info->dma_handle); 678 info->dma_handle);
@@ -699,7 +699,6 @@ static int __devexit bfin_bf54x_remove(struct platform_device *pdev)
699 dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer, 699 dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer,
700 info->dma_handle); 700 info->dma_handle);
701 701
702 kfree(fbinfo->pseudo_palette);
703 fb_dealloc_cmap(&fbinfo->cmap); 702 fb_dealloc_cmap(&fbinfo->cmap);
704 703
705#ifndef NO_BL_SUPPORT 704#ifndef NO_BL_SUPPORT