Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/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

+2
drivers/video/amba-clcd.c
··· 447 447 goto out; 448 448 } 449 449 450 + fb->fb.device = &fb->dev->dev; 451 + 450 452 fb->fb.fix.mmio_start = fb->dev->res.start; 451 453 fb->fb.fix.mmio_len = resource_size(&fb->dev->res); 452 454
-16
drivers/video/fsl-diu-fb.c
··· 555 555 static int fsl_diu_check_var(struct fb_var_screeninfo *var, 556 556 struct fb_info *info) 557 557 { 558 - unsigned long htotal, vtotal; 559 - 560 558 pr_debug("check_var xres: %d\n", var->xres); 561 559 pr_debug("check_var yres: %d\n", var->yres); 562 560 ··· 632 634 var->transp.msb_right = 0; 633 635 634 636 break; 635 - } 636 - /* If the pixclock is below the minimum spec'd value then set to 637 - * refresh rate for 60Hz since this is supported by most monitors. 638 - * Refer to Documentation/fb/ for calculations. 639 - */ 640 - if ((var->pixclock < MIN_PIX_CLK) || (var->pixclock > MAX_PIX_CLK)) { 641 - htotal = var->xres + var->right_margin + var->hsync_len + 642 - var->left_margin; 643 - vtotal = var->yres + var->lower_margin + var->vsync_len + 644 - var->upper_margin; 645 - var->pixclock = (vtotal * htotal * 6UL) / 100UL; 646 - var->pixclock = KHZ2PICOS(var->pixclock); 647 - pr_debug("pixclock set for 60Hz refresh = %u ps\n", 648 - var->pixclock); 649 637 } 650 638 651 639 var->height = -1;
+7 -7
drivers/video/geode/gx1fb_core.c
··· 29 29 static char panel_option[32] = ""; 30 30 31 31 /* Modes relevant to the GX1 (taken from modedb.c) */ 32 - static const struct fb_videomode __initdata gx1_modedb[] = { 32 + static const struct fb_videomode __devinitdata gx1_modedb[] = { 33 33 /* 640x480-60 VESA */ 34 34 { NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2, 35 35 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, ··· 195 195 return par->vid_ops->blank_display(info, blank_mode); 196 196 } 197 197 198 - static int __init gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev) 198 + static int __devinit gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev) 199 199 { 200 200 struct geodefb_par *par = info->par; 201 201 unsigned gx_base; ··· 268 268 .fb_imageblit = cfb_imageblit, 269 269 }; 270 270 271 - static struct fb_info * __init gx1fb_init_fbinfo(struct device *dev) 271 + static struct fb_info * __devinit gx1fb_init_fbinfo(struct device *dev) 272 272 { 273 273 struct geodefb_par *par; 274 274 struct fb_info *info; ··· 318 318 return info; 319 319 } 320 320 321 - static int __init gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id) 321 + static int __devinit gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id) 322 322 { 323 323 struct geodefb_par *par; 324 324 struct fb_info *info; ··· 382 382 return ret; 383 383 } 384 384 385 - static void gx1fb_remove(struct pci_dev *pdev) 385 + static void __devexit gx1fb_remove(struct pci_dev *pdev) 386 386 { 387 387 struct fb_info *info = pci_get_drvdata(pdev); 388 388 struct geodefb_par *par = info->par; ··· 441 441 .name = "gx1fb", 442 442 .id_table = gx1fb_id_table, 443 443 .probe = gx1fb_probe, 444 - .remove = gx1fb_remove, 444 + .remove = __devexit_p(gx1fb_remove), 445 445 }; 446 446 447 447 static int __init gx1fb_init(void) ··· 456 456 return pci_register_driver(&gx1fb_driver); 457 457 } 458 458 459 - static void __exit gx1fb_cleanup(void) 459 + static void __devexit gx1fb_cleanup(void) 460 460 { 461 461 pci_unregister_driver(&gx1fb_driver); 462 462 }
+2 -1
drivers/video/hecubafb.c
··· 233 233 234 234 videomemory = vzalloc(videomemorysize); 235 235 if (!videomemory) 236 - return retval; 236 + goto err_videomem_alloc; 237 237 238 238 info = framebuffer_alloc(sizeof(struct hecubafb_par), &dev->dev); 239 239 if (!info) ··· 275 275 framebuffer_release(info); 276 276 err_fballoc: 277 277 vfree(videomemory); 278 + err_videomem_alloc: 278 279 module_put(board->owner); 279 280 return retval; 280 281 }
+1 -1
drivers/video/sh_mobile_meram.c
··· 218 218 icb_offset = 0xc0000000 | (cfg->current_reg << 23); 219 219 220 220 *icb_addr_y = icb_offset | (cfg->icb[0].marker_icb << 24); 221 - if ((*icb_addr_c) && is_nvcolor(cfg->pixelformat)) 221 + if (is_nvcolor(cfg->pixelformat)) 222 222 *icb_addr_c = icb_offset | (cfg->icb[1].marker_icb << 24); 223 223 } 224 224
+1 -1
drivers/video/sm501fb.c
··· 1664 1664 resource_size(info->regs_res)); 1665 1665 } 1666 1666 1667 - static int sm501fb_init_fb(struct fb_info *fb, 1667 + static int __devinit sm501fb_init_fb(struct fb_info *fb, 1668 1668 enum sm501_controller head, 1669 1669 const char *fbname) 1670 1670 {
+6 -2
drivers/video/udlfb.c
··· 1233 1233 if (dlfb_is_valid_mode(&info->monspecs.modedb[i], info)) 1234 1234 fb_add_videomode(&info->monspecs.modedb[i], 1235 1235 &info->modelist); 1236 - else /* if we've removed top/best mode */ 1237 - info->monspecs.misc &= ~FB_MISC_1ST_DETAIL; 1236 + else { 1237 + if (i == 0) 1238 + /* if we've removed top/best mode */ 1239 + info->monspecs.misc 1240 + &= ~FB_MISC_1ST_DETAIL; 1241 + } 1238 1242 } 1239 1243 1240 1244 default_vmode = fb_find_best_display(&info->monspecs,
+1
drivers/video/vesafb.c
··· 175 175 176 176 static void vesafb_destroy(struct fb_info *info) 177 177 { 178 + fb_dealloc_cmap(&info->cmap); 178 179 if (info->screen_base) 179 180 iounmap(info->screen_base); 180 181 release_mem_region(info->apertures->ranges[0].base, info->apertures->ranges[0].size);
-6
include/linux/fsl-diu-fb.h
··· 24 24 * See mpc8610fb_set_par(), map_video_memory(), and unmap_video_memory() 25 25 */ 26 26 #define MEM_ALLOC_THRESHOLD (1024*768*4+32) 27 - /* Minimum value that the pixel clock can be set to in pico seconds 28 - * This is determined by platform clock/3 where the minimum platform 29 - * clock is 533MHz. This gives 5629 pico seconds. 30 - */ 31 - #define MIN_PIX_CLK 5629 32 - #define MAX_PIX_CLK 96096 33 27 34 28 #include <linux/types.h> 35 29