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>
Arnaud Patard <arnaud.patard@rtp-net.org>
Arnd Bergmann <arnd@arndb.de>
Axel Dyks <xl@xlsigned.net>
Axel Lin <axel.lin@gmail.com>
Ben Gardner <bgardner@wabtec.com>
Ben M Cahill <ben.m.cahill@intel.com>
Björn Steinbrink <B.Steinbrink@gmx.de>
......
......@@ -696,6 +696,7 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev)
{
struct backlight_properties props;
dma_addr_t dma_handle;
int ret;
if (request_dma(CH_PPI, KBUILD_MODNAME)) {
pr_err("couldn't request PPI DMA\n");
......@@ -704,17 +705,16 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev)
if (request_ports()) {
pr_err("couldn't request gpio port\n");
free_dma(CH_PPI);
return -EFAULT;
ret = -EFAULT;
goto out_ports;
}
fb_buffer = dma_alloc_coherent(NULL, TOTAL_VIDEO_MEM_SIZE,
&dma_handle, GFP_KERNEL);
if (fb_buffer == NULL) {
pr_err("couldn't allocate dma buffer\n");
free_dma(CH_PPI);
free_ports();
return -ENOMEM;
ret = -ENOMEM;
goto out_dma_coherent;
}
if (L1_DATA_A_LENGTH)
......@@ -725,10 +725,8 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev)
if (dma_desc_table == NULL) {
pr_err("couldn't allocate dma descriptor\n");
free_dma(CH_PPI);
free_ports();
dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0);
return -ENOMEM;
ret = -ENOMEM;
goto out_table;
}
bfin_lq035_fb.screen_base = (void *)fb_buffer;
......@@ -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);
if (bfin_lq035_fb.pseudo_palette == NULL) {
pr_err("failed to allocate pseudo_palette\n");
free_dma(CH_PPI);
free_ports();
dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0);
return -ENOMEM;
ret = -ENOMEM;
goto out_palette;
}
if (fb_alloc_cmap(&bfin_lq035_fb.cmap, NBR_PALETTE, 0) < 0) {
pr_err("failed to allocate colormap (%d entries)\n",
NBR_PALETTE);
free_dma(CH_PPI);
free_ports();
dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0);
kfree(bfin_lq035_fb.pseudo_palette);
return -EFAULT;
ret = -EFAULT;
goto out_cmap;
}
if (register_framebuffer(&bfin_lq035_fb) < 0) {
pr_err("unable to register framebuffer\n");
free_dma(CH_PPI);
free_ports();
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;
ret = -EINVAL;
goto out_reg;
}
i2c_add_driver(&ad5280_driver);
......@@ -807,11 +795,31 @@ static int __devinit bfin_lq035_probe(struct platform_device *pdev)
lcd_dev = lcd_device_register(KBUILD_MODNAME, &pdev->dev, NULL,
&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,
pr_info("initialized");
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)
......
......@@ -202,11 +202,7 @@ static void vgacon_scrollback_init(int pitch)
}
}
/*
* 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)
static void vgacon_scrollback_startup(void)
{
vgacon_scrollback = kcalloc(CONFIG_VGACON_SOFT_SCROLLBACK_SIZE, 1024, GFP_NOWAIT);
vgacon_scrollback_init(vga_video_num_columns * 2);
......
......@@ -1092,9 +1092,10 @@ static int __init fb_probe(struct platform_device *device)
irq_freq:
#ifdef CONFIG_CPU_FREQ
lcd_da8xx_cpufreq_deregister(par);
#endif
err_cpu_freq:
unregister_framebuffer(da8xx_fb_info);
#endif
err_dealloc_cmap:
fb_dealloc_cmap(&da8xx_fb_info->cmap);
......
......@@ -696,6 +696,8 @@ static int nuc900fb_remove(struct platform_device *pdev)
nuc900fb_stop_lcd(fbinfo);
msleep(1);
unregister_framebuffer(fbinfo);
nuc900fb_cpufreq_deregister(fbi);
nuc900fb_unmap_video_memory(fbinfo);
iounmap(fbi->io);
......@@ -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 nuc900fb_info *info = fbinfo->par;
nuc900fb_stop_lcd();
nuc900fb_stop_lcd(fbinfo);
msleep(1);
clk_disable(info->clk);
return 0;
......@@ -740,7 +742,7 @@ static int nuc900fb_resume(struct platform_device *dev)
msleep(1);
nuc900fb_init_registers(fbinfo);
nuc900fb_activate_var(bfinfo);
nuc900fb_activate_var(fbinfo);
return 0;
}
......
......@@ -701,16 +701,12 @@ static int __devinit pxa168fb_probe(struct platform_device *pdev)
*/
pxa168fb_init_mode(info, mi);
ret = pxa168fb_check_var(&info->var, info);
if (ret)
goto failed_free_fbmem;
/*
* Fill in sane defaults.
*/
ret = pxa168fb_check_var(&info->var, info);
if (ret)
goto failed;
goto failed_free_fbmem;
/*
* 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
* is handled via mmap()ed memory areas and an ioctl.
......@@ -421,7 +421,7 @@ pxa3xx_gcu_misc_write(struct file *filp, const char *buff,
buffer->next = priv->free;
priv->free = buffer;
spin_unlock_irqrestore(&priv->spinlock, flags);
return ret;
return -EFAULT;
}
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