diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-25 18:01:22 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-25 18:01:22 -0500 |
| commit | 9948d378b99b06f6f34164dd8ff827e228ae9251 (patch) | |
| tree | 35de4877d4745bb9f219178f33629980168ba74d | |
| parent | fd3830b379b87b9a47d796d79d1e41f73e1973fa (diff) | |
| parent | 45f1798484748894c348a76fcf0b9ec43d891795 (diff) | |
Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6:
mailmap: Add an entry for Axel Lin.
video: fix some comments in drivers/video/console/vgacon.c
drivers/video/bf537-lq035.c: Add missing IS_ERR test
video: pxa168fb: remove a redundant pxa168fb_check_var call
video: da8xx-fb: fix fb_probe error path
video: pxa3xx-gcu: Return -EFAULT when copy_from_user() fails
video: nuc900fb: properly free resources in nuc900fb_remove
video: nuc900fb: fix compile error
| -rw-r--r-- | .mailmap | 1 | ||||
| -rw-r--r-- | drivers/video/bf537-lq035.c | 58 | ||||
| -rw-r--r-- | drivers/video/console/vgacon.c | 6 | ||||
| -rw-r--r-- | drivers/video/da8xx-fb.c | 3 | ||||
| -rw-r--r-- | drivers/video/nuc900fb.c | 6 | ||||
| -rw-r--r-- | drivers/video/pxa168fb.c | 6 | ||||
| -rw-r--r-- | drivers/video/pxa3xx-gcu.c | 4 |
7 files changed, 44 insertions, 40 deletions
| @@ -23,6 +23,7 @@ Andy Adamson <andros@citi.umich.edu> | |||
| 23 | Arnaud Patard <arnaud.patard@rtp-net.org> | 23 | Arnaud Patard <arnaud.patard@rtp-net.org> |
| 24 | Arnd Bergmann <arnd@arndb.de> | 24 | Arnd Bergmann <arnd@arndb.de> |
| 25 | Axel Dyks <xl@xlsigned.net> | 25 | Axel Dyks <xl@xlsigned.net> |
| 26 | Axel Lin <axel.lin@gmail.com> | ||
| 26 | Ben Gardner <bgardner@wabtec.com> | 27 | Ben Gardner <bgardner@wabtec.com> |
| 27 | Ben M Cahill <ben.m.cahill@intel.com> | 28 | Ben M Cahill <ben.m.cahill@intel.com> |
| 28 | Björn Steinbrink <B.Steinbrink@gmx.de> | 29 | Björn Steinbrink <B.Steinbrink@gmx.de> |
diff --git a/drivers/video/bf537-lq035.c b/drivers/video/bf537-lq035.c index 18c507874ff1..47c21fb2c82f 100644 --- a/drivers/video/bf537-lq035.c +++ b/drivers/video/bf537-lq035.c | |||
| @@ -696,6 +696,7 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev) | |||
| 696 | { | 696 | { |
| 697 | struct backlight_properties props; | 697 | struct backlight_properties props; |
| 698 | dma_addr_t dma_handle; | 698 | dma_addr_t dma_handle; |
| 699 | int ret; | ||
| 699 | 700 | ||
| 700 | if (request_dma(CH_PPI, KBUILD_MODNAME)) { | 701 | if (request_dma(CH_PPI, KBUILD_MODNAME)) { |
| 701 | pr_err("couldn't request PPI DMA\n"); | 702 | pr_err("couldn't request PPI DMA\n"); |
| @@ -704,17 +705,16 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev) | |||
| 704 | 705 | ||
| 705 | if (request_ports()) { | 706 | if (request_ports()) { |
| 706 | pr_err("couldn't request gpio port\n"); | 707 | pr_err("couldn't request gpio port\n"); |
| 707 | free_dma(CH_PPI); | 708 | ret = -EFAULT; |
| 708 | return -EFAULT; | 709 | goto out_ports; |
| 709 | } | 710 | } |
| 710 | 711 | ||
| 711 | fb_buffer = dma_alloc_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, | 712 | fb_buffer = dma_alloc_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, |
| 712 | &dma_handle, GFP_KERNEL); | 713 | &dma_handle, GFP_KERNEL); |
| 713 | if (fb_buffer == NULL) { | 714 | if (fb_buffer == NULL) { |
| 714 | pr_err("couldn't allocate dma buffer\n"); | 715 | pr_err("couldn't allocate dma buffer\n"); |
| 715 | free_dma(CH_PPI); | 716 | ret = -ENOMEM; |
| 716 | free_ports(); | 717 | goto out_dma_coherent; |
| 717 | return -ENOMEM; | ||
| 718 | } | 718 | } |
| 719 | 719 | ||
| 720 | if (L1_DATA_A_LENGTH) | 720 | if (L1_DATA_A_LENGTH) |
| @@ -725,10 +725,8 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev) | |||
| 725 | 725 | ||
| 726 | if (dma_desc_table == NULL) { | 726 | if (dma_desc_table == NULL) { |
| 727 | pr_err("couldn't allocate dma descriptor\n"); | 727 | pr_err("couldn't allocate dma descriptor\n"); |
| 728 | free_dma(CH_PPI); | 728 | ret = -ENOMEM; |
| 729 | free_ports(); | 729 | goto out_table; |
| 730 | dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0); | ||
| 731 | return -ENOMEM; | ||
| 732 | } | 730 | } |
| 733 | 731 | ||
| 734 | bfin_lq035_fb.screen_base = (void *)fb_buffer; | 732 | bfin_lq035_fb.screen_base = (void *)fb_buffer; |
| @@ -771,31 +769,21 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev) | |||
| 771 | bfin_lq035_fb.pseudo_palette = kzalloc(sizeof(u32) * 16, GFP_KERNEL); | 769 | bfin_lq035_fb.pseudo_palette = kzalloc(sizeof(u32) * 16, GFP_KERNEL); |
| 772 | if (bfin_lq035_fb.pseudo_palette == NULL) { | 770 | if (bfin_lq035_fb.pseudo_palette == NULL) { |
| 773 | pr_err("failed to allocate pseudo_palette\n"); | 771 | pr_err("failed to allocate pseudo_palette\n"); |
| 774 | free_dma(CH_PPI); | 772 | ret = -ENOMEM; |
| 775 | free_ports(); | 773 | goto out_palette; |
| 776 | dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0); | ||
| 777 | return -ENOMEM; | ||
| 778 | } | 774 | } |
| 779 | 775 | ||
| 780 | if (fb_alloc_cmap(&bfin_lq035_fb.cmap, NBR_PALETTE, 0) < 0) { | 776 | if (fb_alloc_cmap(&bfin_lq035_fb.cmap, NBR_PALETTE, 0) < 0) { |
| 781 | pr_err("failed to allocate colormap (%d entries)\n", | 777 | pr_err("failed to allocate colormap (%d entries)\n", |
| 782 | NBR_PALETTE); | 778 | NBR_PALETTE); |
| 783 | free_dma(CH_PPI); | 779 | ret = -EFAULT; |
| 784 | free_ports(); | 780 | goto out_cmap; |
| 785 | dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0); | ||
| 786 | kfree(bfin_lq035_fb.pseudo_palette); | ||
| 787 | return -EFAULT; | ||
| 788 | } | 781 | } |
| 789 | 782 | ||
| 790 | if (register_framebuffer(&bfin_lq035_fb) < 0) { | 783 | if (register_framebuffer(&bfin_lq035_fb) < 0) { |
| 791 | pr_err("unable to register framebuffer\n"); | 784 | pr_err("unable to register framebuffer\n"); |
| 792 | free_dma(CH_PPI); | 785 | ret = -EINVAL; |
| 793 | free_ports(); | 786 | goto out_reg; |
| 794 | dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0); | ||
| 795 | fb_buffer = NULL; | ||
| 796 | kfree(bfin_lq035_fb.pseudo_palette); | ||
| 797 | fb_dealloc_cmap(&bfin_lq035_fb.cmap); | ||
| 798 | return -EINVAL; | ||
| 799 | } | 787 | } |
| 800 | 788 | ||
| 801 | i2c_add_driver(&ad5280_driver); | 789 | i2c_add_driver(&ad5280_driver); |
| @@ -807,11 +795,31 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev) | |||
| 807 | 795 | ||
| 808 | lcd_dev = lcd_device_register(KBUILD_MODNAME, &pdev->dev, NULL, | 796 | lcd_dev = lcd_device_register(KBUILD_MODNAME, &pdev->dev, NULL, |
| 809 | &bfin_lcd_ops); | 797 | &bfin_lcd_ops); |
| 798 | if (IS_ERR(lcd_dev)) { | ||
| 799 | pr_err("unable to register lcd\n"); | ||
| 800 | ret = PTR_ERR(lcd_dev); | ||
| 801 | goto out_lcd; | ||
| 802 | } | ||
| 810 | lcd_dev->props.max_contrast = 255, | 803 | lcd_dev->props.max_contrast = 255, |
| 811 | 804 | ||
| 812 | pr_info("initialized"); | 805 | pr_info("initialized"); |
| 813 | 806 | ||
| 814 | return 0; | 807 | return 0; |
| 808 | out_lcd: | ||
| 809 | unregister_framebuffer(&bfin_lq035_fb); | ||
| 810 | out_reg: | ||
| 811 | fb_dealloc_cmap(&bfin_lq035_fb.cmap); | ||
| 812 | out_cmap: | ||
| 813 | kfree(bfin_lq035_fb.pseudo_palette); | ||
| 814 | out_palette: | ||
| 815 | out_table: | ||
| 816 | dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0); | ||
| 817 | fb_buffer = NULL; | ||
| 818 | out_dma_coherent: | ||
| 819 | free_ports(); | ||
| 820 | out_ports: | ||
| 821 | free_dma(CH_PPI); | ||
| 822 | return ret; | ||
| 815 | } | 823 | } |
| 816 | 824 | ||
| 817 | static int __devexit bfin_lq035_remove(struct platform_device *pdev) | 825 | static int __devexit bfin_lq035_remove(struct platform_device *pdev) |
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index c97491b8b39b..915fd74da7a2 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c | |||
| @@ -202,11 +202,7 @@ static void vgacon_scrollback_init(int pitch) | |||
| 202 | } | 202 | } |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | /* | 205 | static void vgacon_scrollback_startup(void) |
| 206 | * Called only duing init so call of alloc_bootmen is ok. | ||
| 207 | * Marked __init_refok to silence modpost. | ||
| 208 | */ | ||
| 209 | static void __init_refok vgacon_scrollback_startup(void) | ||
| 210 | { | 206 | { |
| 211 | vgacon_scrollback = kcalloc(CONFIG_VGACON_SOFT_SCROLLBACK_SIZE, 1024, GFP_NOWAIT); | 207 | vgacon_scrollback = kcalloc(CONFIG_VGACON_SOFT_SCROLLBACK_SIZE, 1024, GFP_NOWAIT); |
| 212 | vgacon_scrollback_init(vga_video_num_columns * 2); | 208 | vgacon_scrollback_init(vga_video_num_columns * 2); |
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index c265aed09e04..520047ac6e3e 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c | |||
| @@ -1092,9 +1092,10 @@ static int __init fb_probe(struct platform_device *device) | |||
| 1092 | 1092 | ||
| 1093 | irq_freq: | 1093 | irq_freq: |
| 1094 | #ifdef CONFIG_CPU_FREQ | 1094 | #ifdef CONFIG_CPU_FREQ |
| 1095 | lcd_da8xx_cpufreq_deregister(par); | ||
| 1096 | #endif | ||
| 1095 | err_cpu_freq: | 1097 | err_cpu_freq: |
| 1096 | unregister_framebuffer(da8xx_fb_info); | 1098 | unregister_framebuffer(da8xx_fb_info); |
| 1097 | #endif | ||
| 1098 | 1099 | ||
| 1099 | err_dealloc_cmap: | 1100 | err_dealloc_cmap: |
| 1100 | fb_dealloc_cmap(&da8xx_fb_info->cmap); | 1101 | fb_dealloc_cmap(&da8xx_fb_info->cmap); |
diff --git a/drivers/video/nuc900fb.c b/drivers/video/nuc900fb.c index 62498bd662fc..f838d9e277f0 100644 --- a/drivers/video/nuc900fb.c +++ b/drivers/video/nuc900fb.c | |||
| @@ -696,6 +696,8 @@ static int nuc900fb_remove(struct platform_device *pdev) | |||
| 696 | nuc900fb_stop_lcd(fbinfo); | 696 | nuc900fb_stop_lcd(fbinfo); |
| 697 | msleep(1); | 697 | msleep(1); |
| 698 | 698 | ||
| 699 | unregister_framebuffer(fbinfo); | ||
| 700 | nuc900fb_cpufreq_deregister(fbi); | ||
| 699 | nuc900fb_unmap_video_memory(fbinfo); | 701 | nuc900fb_unmap_video_memory(fbinfo); |
| 700 | 702 | ||
| 701 | iounmap(fbi->io); | 703 | iounmap(fbi->io); |
| @@ -723,7 +725,7 @@ static int nuc900fb_suspend(struct platform_device *dev, pm_message_t state) | |||
| 723 | struct fb_info *fbinfo = platform_get_drvdata(dev); | 725 | struct fb_info *fbinfo = platform_get_drvdata(dev); |
| 724 | struct nuc900fb_info *info = fbinfo->par; | 726 | struct nuc900fb_info *info = fbinfo->par; |
| 725 | 727 | ||
| 726 | nuc900fb_stop_lcd(); | 728 | nuc900fb_stop_lcd(fbinfo); |
| 727 | msleep(1); | 729 | msleep(1); |
| 728 | clk_disable(info->clk); | 730 | clk_disable(info->clk); |
| 729 | return 0; | 731 | return 0; |
| @@ -740,7 +742,7 @@ static int nuc900fb_resume(struct platform_device *dev) | |||
| 740 | msleep(1); | 742 | msleep(1); |
| 741 | 743 | ||
| 742 | nuc900fb_init_registers(fbinfo); | 744 | nuc900fb_init_registers(fbinfo); |
| 743 | nuc900fb_activate_var(bfinfo); | 745 | nuc900fb_activate_var(fbinfo); |
| 744 | 746 | ||
| 745 | return 0; | 747 | return 0; |
| 746 | } | 748 | } |
diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c index cea6403ae71c..35f61dd0cb3a 100644 --- a/drivers/video/pxa168fb.c +++ b/drivers/video/pxa168fb.c | |||
| @@ -701,16 +701,12 @@ static int __devinit pxa168fb_probe(struct platform_device *pdev) | |||
| 701 | */ | 701 | */ |
| 702 | pxa168fb_init_mode(info, mi); | 702 | pxa168fb_init_mode(info, mi); |
| 703 | 703 | ||
| 704 | ret = pxa168fb_check_var(&info->var, info); | ||
| 705 | if (ret) | ||
| 706 | goto failed_free_fbmem; | ||
| 707 | |||
| 708 | /* | 704 | /* |
| 709 | * Fill in sane defaults. | 705 | * Fill in sane defaults. |
| 710 | */ | 706 | */ |
| 711 | ret = pxa168fb_check_var(&info->var, info); | 707 | ret = pxa168fb_check_var(&info->var, info); |
| 712 | if (ret) | 708 | if (ret) |
| 713 | goto failed; | 709 | goto failed_free_fbmem; |
| 714 | 710 | ||
| 715 | /* | 711 | /* |
| 716 | * enable controller clock | 712 | * enable controller clock |
diff --git a/drivers/video/pxa3xx-gcu.c b/drivers/video/pxa3xx-gcu.c index b81168df253d..cf4beb9dc9bb 100644 --- a/drivers/video/pxa3xx-gcu.c +++ b/drivers/video/pxa3xx-gcu.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * pxa3xx-gc.c - Linux kernel module for PXA3xx graphics controllers | 2 | * pxa3xx-gcu.c - Linux kernel module for PXA3xx graphics controllers |
| 3 | * | 3 | * |
| 4 | * This driver needs a DirectFB counterpart in user space, communication | 4 | * This driver needs a DirectFB counterpart in user space, communication |
| 5 | * is handled via mmap()ed memory areas and an ioctl. | 5 | * is handled via mmap()ed memory areas and an ioctl. |
| @@ -421,7 +421,7 @@ pxa3xx_gcu_misc_write(struct file *filp, const char *buff, | |||
| 421 | buffer->next = priv->free; | 421 | buffer->next = priv->free; |
| 422 | priv->free = buffer; | 422 | priv->free = buffer; |
| 423 | spin_unlock_irqrestore(&priv->spinlock, flags); | 423 | spin_unlock_irqrestore(&priv->spinlock, flags); |
| 424 | return ret; | 424 | return -EFAULT; |
| 425 | } | 425 | } |
| 426 | 426 | ||
| 427 | buffer->length = words; | 427 | buffer->length = words; |
