Skip to content

Commit

Permalink
Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/lethal/fbdev-3.x

* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-3.x:
  vesafb: fix memory leak
  fbdev: amba: Link fb device to its parent
  fsl-diu-fb: remove check for pixel clock ranges
  udlfb: Correct sub-optimal resolution selection.
  hecubafb: add module_put on error path in hecubafb_probe()
  sm501fb: fix section mismatch warning
  gx1fb: Fix section mismatch warnings
  fbdev: sh_mobile_meram: Correct pointer check for YCbCr chroma plane
  • Loading branch information
torvalds committed Jul 4, 2011
2 parents b2bc478 + 3e86f1d commit aababb9
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 34 deletions.
2 changes: 2 additions & 0 deletions drivers/video/amba-clcd.c
Expand Up @@ -447,6 +447,8 @@ static int clcdfb_register(struct clcd_fb *fb)
goto out;
}

fb->fb.device = &fb->dev->dev;

fb->fb.fix.mmio_start = fb->dev->res.start;
fb->fb.fix.mmio_len = resource_size(&fb->dev->res);

Expand Down
16 changes: 0 additions & 16 deletions drivers/video/fsl-diu-fb.c
Expand Up @@ -555,8 +555,6 @@ static void adjust_aoi_size_position(struct fb_var_screeninfo *var,
static int fsl_diu_check_var(struct fb_var_screeninfo *var,
struct fb_info *info)
{
unsigned long htotal, vtotal;

pr_debug("check_var xres: %d\n", var->xres);
pr_debug("check_var yres: %d\n", var->yres);

Expand Down Expand Up @@ -635,20 +633,6 @@ static int fsl_diu_check_var(struct fb_var_screeninfo *var,

break;
}
/* If the pixclock is below the minimum spec'd value then set to
* refresh rate for 60Hz since this is supported by most monitors.
* Refer to Documentation/fb/ for calculations.
*/
if ((var->pixclock < MIN_PIX_CLK) || (var->pixclock > MAX_PIX_CLK)) {
htotal = var->xres + var->right_margin + var->hsync_len +
var->left_margin;
vtotal = var->yres + var->lower_margin + var->vsync_len +
var->upper_margin;
var->pixclock = (vtotal * htotal * 6UL) / 100UL;
var->pixclock = KHZ2PICOS(var->pixclock);
pr_debug("pixclock set for 60Hz refresh = %u ps\n",
var->pixclock);
}

var->height = -1;
var->width = -1;
Expand Down
14 changes: 7 additions & 7 deletions drivers/video/geode/gx1fb_core.c
Expand Up @@ -29,7 +29,7 @@ static int crt_option = 1;
static char panel_option[32] = "";

/* Modes relevant to the GX1 (taken from modedb.c) */
static const struct fb_videomode __initdata gx1_modedb[] = {
static const struct fb_videomode __devinitdata gx1_modedb[] = {
/* 640x480-60 VESA */
{ NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2,
0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
Expand Down Expand Up @@ -195,7 +195,7 @@ static int gx1fb_blank(int blank_mode, struct fb_info *info)
return par->vid_ops->blank_display(info, blank_mode);
}

static int __init gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev)
static int __devinit gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev)
{
struct geodefb_par *par = info->par;
unsigned gx_base;
Expand Down Expand Up @@ -268,7 +268,7 @@ static struct fb_ops gx1fb_ops = {
.fb_imageblit = cfb_imageblit,
};

static struct fb_info * __init gx1fb_init_fbinfo(struct device *dev)
static struct fb_info * __devinit gx1fb_init_fbinfo(struct device *dev)
{
struct geodefb_par *par;
struct fb_info *info;
Expand Down Expand Up @@ -318,7 +318,7 @@ static struct fb_info * __init gx1fb_init_fbinfo(struct device *dev)
return info;
}

static int __init gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
static int __devinit gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
struct geodefb_par *par;
struct fb_info *info;
Expand Down Expand Up @@ -382,7 +382,7 @@ static int __init gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *
return ret;
}

static void gx1fb_remove(struct pci_dev *pdev)
static void __devexit gx1fb_remove(struct pci_dev *pdev)
{
struct fb_info *info = pci_get_drvdata(pdev);
struct geodefb_par *par = info->par;
Expand Down Expand Up @@ -441,7 +441,7 @@ static struct pci_driver gx1fb_driver = {
.name = "gx1fb",
.id_table = gx1fb_id_table,
.probe = gx1fb_probe,
.remove = gx1fb_remove,
.remove = __devexit_p(gx1fb_remove),
};

static int __init gx1fb_init(void)
Expand All @@ -456,7 +456,7 @@ static int __init gx1fb_init(void)
return pci_register_driver(&gx1fb_driver);
}

static void __exit gx1fb_cleanup(void)
static void __devexit gx1fb_cleanup(void)
{
pci_unregister_driver(&gx1fb_driver);
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/video/hecubafb.c
Expand Up @@ -233,7 +233,7 @@ static int __devinit hecubafb_probe(struct platform_device *dev)

videomemory = vzalloc(videomemorysize);
if (!videomemory)
return retval;
goto err_videomem_alloc;

info = framebuffer_alloc(sizeof(struct hecubafb_par), &dev->dev);
if (!info)
Expand Down Expand Up @@ -275,6 +275,7 @@ static int __devinit hecubafb_probe(struct platform_device *dev)
framebuffer_release(info);
err_fballoc:
vfree(videomemory);
err_videomem_alloc:
module_put(board->owner);
return retval;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/sh_mobile_meram.c
Expand Up @@ -218,7 +218,7 @@ static inline void meram_get_next_icb_addr(struct sh_mobile_meram_info *pdata,
icb_offset = 0xc0000000 | (cfg->current_reg << 23);

*icb_addr_y = icb_offset | (cfg->icb[0].marker_icb << 24);
if ((*icb_addr_c) && is_nvcolor(cfg->pixelformat))
if (is_nvcolor(cfg->pixelformat))
*icb_addr_c = icb_offset | (cfg->icb[1].marker_icb << 24);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/video/sm501fb.c
Expand Up @@ -1664,7 +1664,7 @@ static void sm501fb_stop(struct sm501fb_info *info)
resource_size(info->regs_res));
}

static int sm501fb_init_fb(struct fb_info *fb,
static int __devinit sm501fb_init_fb(struct fb_info *fb,
enum sm501_controller head,
const char *fbname)
{
Expand Down
8 changes: 6 additions & 2 deletions drivers/video/udlfb.c
Expand Up @@ -1233,8 +1233,12 @@ static int dlfb_setup_modes(struct dlfb_data *dev,
if (dlfb_is_valid_mode(&info->monspecs.modedb[i], info))
fb_add_videomode(&info->monspecs.modedb[i],
&info->modelist);
else /* if we've removed top/best mode */
info->monspecs.misc &= ~FB_MISC_1ST_DETAIL;
else {
if (i == 0)
/* if we've removed top/best mode */
info->monspecs.misc
&= ~FB_MISC_1ST_DETAIL;
}
}

default_vmode = fb_find_best_display(&info->monspecs,
Expand Down
1 change: 1 addition & 0 deletions drivers/video/vesafb.c
Expand Up @@ -175,6 +175,7 @@ static int vesafb_setcolreg(unsigned regno, unsigned red, unsigned green,

static void vesafb_destroy(struct fb_info *info)
{
fb_dealloc_cmap(&info->cmap);
if (info->screen_base)
iounmap(info->screen_base);
release_mem_region(info->apertures->ranges[0].base, info->apertures->ranges[0].size);
Expand Down
6 changes: 0 additions & 6 deletions include/linux/fsl-diu-fb.h
Expand Up @@ -24,12 +24,6 @@
* See mpc8610fb_set_par(), map_video_memory(), and unmap_video_memory()
*/
#define MEM_ALLOC_THRESHOLD (1024*768*4+32)
/* Minimum value that the pixel clock can be set to in pico seconds
* This is determined by platform clock/3 where the minimum platform
* clock is 533MHz. This gives 5629 pico seconds.
*/
#define MIN_PIX_CLK 5629
#define MAX_PIX_CLK 96096

#include <linux/types.h>

Expand Down

0 comments on commit aababb9

Please sign in to comment.