Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lxfb: fix incorrect __init annotation

WARNING: vmlinux.o(.data+0x196e8): Section mismatch in reference from the
variable lxfb_driver to the function .init.text:lxfb_probe() The variable
lxfb_driver references the function __init lxfb_probe()

This changes lxfb_probe and friends to use __devinit, and also adds
__devexit to lxfb_remove.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andres Salomon and committed by
Linus Torvalds
12c46b33 500ebb82

+10 -8
+10 -8
drivers/video/geode/lxfb_core.c
··· 35 35 * we try to make it something sane - 640x480-60 is sane 36 36 */ 37 37 38 - static struct fb_videomode geode_modedb[] __initdata = { 38 + static struct fb_videomode geode_modedb[] __devinitdata = { 39 39 /* 640x480-60 */ 40 40 { NULL, 60, 640, 480, 39682, 48, 8, 25, 2, 88, 2, 41 41 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, ··· 219 219 #ifdef CONFIG_OLPC 220 220 #include <asm/olpc.h> 221 221 222 - static struct fb_videomode olpc_dcon_modedb[] __initdata = { 222 + static struct fb_videomode olpc_dcon_modedb[] __devinitdata = { 223 223 /* The only mode the DCON has is 1200x900 */ 224 224 { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, 225 225 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 226 226 FB_VMODE_NONINTERLACED, 0 } 227 227 }; 228 228 229 - static void __init get_modedb(struct fb_videomode **modedb, unsigned int *size) 229 + static void __devinit get_modedb(struct fb_videomode **modedb, 230 + unsigned int *size) 230 231 { 231 232 if (olpc_has_dcon()) { 232 233 *modedb = (struct fb_videomode *) olpc_dcon_modedb; ··· 239 238 } 240 239 241 240 #else 242 - static void __init get_modedb(struct fb_videomode **modedb, unsigned int *size) 241 + static void __devinit get_modedb(struct fb_videomode **modedb, 242 + unsigned int *size) 243 243 { 244 244 *modedb = (struct fb_videomode *) geode_modedb; 245 245 *size = ARRAY_SIZE(geode_modedb); ··· 336 334 } 337 335 338 336 339 - static int __init lxfb_map_video_memory(struct fb_info *info, 337 + static int __devinit lxfb_map_video_memory(struct fb_info *info, 340 338 struct pci_dev *dev) 341 339 { 342 340 struct lxfb_par *par = info->par; ··· 414 412 .fb_imageblit = cfb_imageblit, 415 413 }; 416 414 417 - static struct fb_info * __init lxfb_init_fbinfo(struct device *dev) 415 + static struct fb_info * __devinit lxfb_init_fbinfo(struct device *dev) 418 416 { 419 417 struct lxfb_par *par; 420 418 struct fb_info *info; ··· 498 496 #define lxfb_resume NULL 499 497 #endif 500 498 501 - static int __init lxfb_probe(struct pci_dev *pdev, 499 + static int __devinit lxfb_probe(struct pci_dev *pdev, 502 500 const struct pci_device_id *id) 503 501 { 504 502 struct lxfb_par *par; ··· 590 588 return ret; 591 589 } 592 590 593 - static void lxfb_remove(struct pci_dev *pdev) 591 + static void __devexit lxfb_remove(struct pci_dev *pdev) 594 592 { 595 593 struct fb_info *info = pci_get_drvdata(pdev); 596 594 struct lxfb_par *par = info->par;