Commit 9948d378 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'fbdev-fixes-for-linus' of...

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
parents fd3830b3 45f17984
...@@ -23,6 +23,7 @@ Andy Adamson <andros@citi.umich.edu> ...@@ -23,6 +23,7 @@ Andy Adamson <andros@citi.umich.edu>
Arnaud Patard <arnaud.patard@rtp-net.org> Arnaud Patard <arnaud.patard@rtp-net.org>
Arnd Bergmann <arnd@arndb.de> Arnd Bergmann <arnd@arndb.de>
Axel Dyks <xl@xlsigned.net> Axel Dyks <xl@xlsigned.net>
Axel Lin <axel.lin@gmail.com>
Ben Gardner <bgardner@wabtec.com> Ben Gardner <bgardner@wabtec.com>
Ben M Cahill <ben.m.cahill@intel.com> Ben M Cahill <ben.m.cahill@intel.com>
Björn Steinbrink <B.Steinbrink@gmx.de> Björn Steinbrink <B.Steinbrink@gmx.de>
......
...@@ -696,6 +696,7 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev) ...@@ -696,6 +696,7 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev)
{ {
struct backlight_properties props; struct backlight_properties props;
dma_addr_t dma_handle; dma_addr_t dma_handle;
int ret;
if (request_dma(CH_PPI, KBUILD_MODNAME)) { if (request_dma(CH_PPI, KBUILD_MODNAME)) {
pr_err("couldn't request PPI DMA\n"); pr_err("couldn't request PPI DMA\n");
...@@ -704,17 +705,16 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev) ...@@ -704,17 +705,16 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev)
if (request_ports()) { if (request_ports()) {
pr_err("couldn't request gpio port\n"); pr_err("couldn't request gpio port\n");
free_dma(CH_PPI); ret = -EFAULT;
return -EFAULT; goto out_ports;
} }
fb_buffer = dma_alloc_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer = dma_alloc_coherent(NULL, TOTAL_VIDEO_MEM_SIZE,
&dma_handle, GFP_KERNEL); &dma_handle, GFP_KERNEL);
if (fb_buffer == NULL) { if (fb_buffer == NULL) {
pr_err("couldn't allocate dma buffer\n"); pr_err("couldn't allocate dma buffer\n");
free_dma(CH_PPI); ret = -ENOMEM;
free_ports(); goto out_dma_coherent;
return -ENOMEM;
} }
if (L1_DATA_A_LENGTH) if (L1_DATA_A_LENGTH)
...@@ -725,10 +725,8 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev) ...@@ -725,10 +725,8 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev)
if (dma_desc_table == NULL) { if (dma_desc_table == NULL) {
pr_err("couldn't allocate dma descriptor\n"); pr_err("couldn't allocate dma descriptor\n");
free_dma(CH_PPI); ret = -ENOMEM;
free_ports(); goto out_table;
dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0);
return -ENOMEM;
} }
bfin_lq035_fb.screen_base = (void *)fb_buffer; bfin_lq035_fb.screen_base = (void *)fb_buffer;
...@@ -771,31 +769,21 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev) ...@@ -771,31 +769,21 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev)
bfin_lq035_fb.pseudo_palette = kzalloc(sizeof(u32) * 16, GFP_KERNEL); bfin_lq035_fb.pseudo_palette = kzalloc(sizeof(u32) * 16, GFP_KERNEL);
if (bfin_lq035_fb.pseudo_palette == NULL) { if (bfin_lq035_fb.pseudo_palette == NULL) {
pr_err("failed to allocate pseudo_palette\n"); pr_err("failed to allocate pseudo_palette\n");
free_dma(CH_PPI); ret = -ENOMEM;
free_ports(); goto out_palette;
dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0);
return -ENOMEM;
} }
if (fb_alloc_cmap(&bfin_lq035_fb.cmap, NBR_PALETTE, 0) < 0) { if (fb_alloc_cmap(&bfin_lq035_fb.cmap, NBR_PALETTE, 0) < 0) {
pr_err("failed to allocate colormap (%d entries)\n", pr_err("failed to allocate colormap (%d entries)\n",
NBR_PALETTE); NBR_PALETTE);
free_dma(CH_PPI); ret = -EFAULT;
free_ports(); goto out_cmap;
dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0);
kfree(bfin_lq035_fb.pseudo_palette);
return -EFAULT;
} }
if (register_framebuffer(&bfin_lq035_fb) < 0) { if (register_framebuffer(&bfin_lq035_fb) < 0) {
pr_err("unable to register framebuffer\n"); pr_err("unable to register framebuffer\n");
free_dma(CH_PPI); ret = -EINVAL;
free_ports(); goto out_reg;
dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0);
fb_buffer = NULL;
kfree(bfin_lq035_fb.pseudo_palette);
fb_dealloc_cmap(&bfin_lq035_fb.cmap);
return -EINVAL;
} }
i2c_add_driver(&ad5280_driver); i2c_add_driver(&ad5280_driver);
...@@ -807,11 +795,31 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev) ...@@ -807,11 +795,31 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev)
lcd_dev = lcd_device_register(KBUILD_MODNAME, &pdev->dev, NULL, lcd_dev = lcd_device_register(KBUILD_MODNAME, &pdev->dev, NULL,
&bfin_lcd_ops); &bfin_lcd_ops);
if (IS_ERR(lcd_dev)) {
pr_err("unable to register lcd\n");
ret = PTR_ERR(lcd_dev);
goto out_lcd;
}
lcd_dev->props.max_contrast = 255, lcd_dev->props.max_contrast = 255,
pr_info("initialized"); pr_info("initialized");
return 0; return 0;
out_lcd:
unregister_framebuffer(&bfin_lq035_fb);
out_reg:
fb_dealloc_cmap(&bfin_lq035_fb.cmap);
out_cmap:
kfree(bfin_lq035_fb.pseudo_palette);
out_palette:
out_table:
dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0);
fb_buffer = NULL;
out_dma_coherent:
free_ports();
out_ports:
free_dma(CH_PPI);
return ret;
} }
static int __devexit bfin_lq035_remove(struct platform_device *pdev) static int __devexit bfin_lq035_remove(struct platform_device *pdev)
......
...@@ -202,11 +202,7 @@ static void vgacon_scrollback_init(int pitch) ...@@ -202,11 +202,7 @@ static void vgacon_scrollback_init(int pitch)
} }
} }
/* static void vgacon_scrollback_startup(void)
* Called only duing init so call of alloc_bootmen is ok.
* Marked __init_refok to silence modpost.
*/
static void __init_refok vgacon_scrollback_startup(void)
{ {
vgacon_scrollback = kcalloc(CONFIG_VGACON_SOFT_SCROLLBACK_SIZE, 1024, GFP_NOWAIT); vgacon_scrollback = kcalloc(CONFIG_VGACON_SOFT_SCROLLBACK_SIZE, 1024, GFP_NOWAIT);
vgacon_scrollback_init(vga_video_num_columns * 2); vgacon_scrollback_init(vga_video_num_columns * 2);
......
...@@ -1092,9 +1092,10 @@ static int __init fb_probe(struct platform_device *device) ...@@ -1092,9 +1092,10 @@ static int __init fb_probe(struct platform_device *device)
irq_freq: irq_freq:
#ifdef CONFIG_CPU_FREQ #ifdef CONFIG_CPU_FREQ
lcd_da8xx_cpufreq_deregister(par);
#endif
err_cpu_freq: err_cpu_freq:
unregister_framebuffer(da8xx_fb_info); unregister_framebuffer(da8xx_fb_info);
#endif
err_dealloc_cmap: err_dealloc_cmap:
fb_dealloc_cmap(&da8xx_fb_info->cmap); fb_dealloc_cmap(&da8xx_fb_info->cmap);
......
...@@ -696,6 +696,8 @@ static int nuc900fb_remove(struct platform_device *pdev) ...@@ -696,6 +696,8 @@ static int nuc900fb_remove(struct platform_device *pdev)
nuc900fb_stop_lcd(fbinfo); nuc900fb_stop_lcd(fbinfo);
msleep(1); msleep(1);
unregister_framebuffer(fbinfo);
nuc900fb_cpufreq_deregister(fbi);
nuc900fb_unmap_video_memory(fbinfo); nuc900fb_unmap_video_memory(fbinfo);
iounmap(fbi->io); iounmap(fbi->io);
...@@ -723,7 +725,7 @@ static int nuc900fb_suspend(struct platform_device *dev, pm_message_t state) ...@@ -723,7 +725,7 @@ static int nuc900fb_suspend(struct platform_device *dev, pm_message_t state)
struct fb_info *fbinfo = platform_get_drvdata(dev); struct fb_info *fbinfo = platform_get_drvdata(dev);
struct nuc900fb_info *info = fbinfo->par; struct nuc900fb_info *info = fbinfo->par;
nuc900fb_stop_lcd(); nuc900fb_stop_lcd(fbinfo);
msleep(1); msleep(1);
clk_disable(info->clk); clk_disable(info->clk);
return 0; return 0;
...@@ -740,7 +742,7 @@ static int nuc900fb_resume(struct platform_device *dev) ...@@ -740,7 +742,7 @@ static int nuc900fb_resume(struct platform_device *dev)
msleep(1); msleep(1);
nuc900fb_init_registers(fbinfo); nuc900fb_init_registers(fbinfo);
nuc900fb_activate_var(bfinfo); nuc900fb_activate_var(fbinfo);
return 0; return 0;
} }
......
...@@ -701,16 +701,12 @@ static int __devinit pxa168fb_probe(struct platform_device *pdev) ...@@ -701,16 +701,12 @@ static int __devinit pxa168fb_probe(struct platform_device *pdev)
*/ */
pxa168fb_init_mode(info, mi); pxa168fb_init_mode(info, mi);
ret = pxa168fb_check_var(&info->var, info);
if (ret)
goto failed_free_fbmem;
/* /*
* Fill in sane defaults. * Fill in sane defaults.
*/ */
ret = pxa168fb_check_var(&info->var, info); ret = pxa168fb_check_var(&info->var, info);
if (ret) if (ret)
goto failed; goto failed_free_fbmem;
/* /*
* enable controller clock * enable controller clock
......
/* /*
* pxa3xx-gc.c - Linux kernel module for PXA3xx graphics controllers * pxa3xx-gcu.c - Linux kernel module for PXA3xx graphics controllers
* *
* This driver needs a DirectFB counterpart in user space, communication * This driver needs a DirectFB counterpart in user space, communication
* is handled via mmap()ed memory areas and an ioctl. * 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,7 +421,7 @@ pxa3xx_gcu_misc_write(struct file *filp, const char *buff,
buffer->next = priv->free; buffer->next = priv->free;
priv->free = buffer; priv->free = buffer;
spin_unlock_irqrestore(&priv->spinlock, flags); spin_unlock_irqrestore(&priv->spinlock, flags);
return ret; return -EFAULT;
} }
buffer->length = words; buffer->length = words;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment