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

gxfb: fix incorrect __init annotation

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

This changes gxfb_probe and friends to use __devinit, and also adds
__devexit to gxfb_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
500ebb82 4d845ebf

+12 -8
+12 -8
drivers/video/geode/gxfb_core.c
··· 40 40 static int vt_switch; 41 41 42 42 /* Modes relevant to the GX (taken from modedb.c) */ 43 - static struct fb_videomode gx_modedb[] __initdata = { 43 + static struct fb_videomode gx_modedb[] __devinitdata = { 44 44 /* 640x480-60 VESA */ 45 45 { NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2, 46 46 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, ··· 110 110 #ifdef CONFIG_OLPC 111 111 #include <asm/olpc.h> 112 112 113 - static struct fb_videomode gx_dcon_modedb[] __initdata = { 113 + static struct fb_videomode gx_dcon_modedb[] __devinitdata = { 114 114 /* The only mode the DCON has is 1200x900 */ 115 115 { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, 116 116 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 117 117 FB_VMODE_NONINTERLACED, 0 } 118 118 }; 119 119 120 - static void __init get_modedb(struct fb_videomode **modedb, unsigned int *size) 120 + static void __devinit get_modedb(struct fb_videomode **modedb, 121 + unsigned int *size) 121 122 { 122 123 if (olpc_has_dcon()) { 123 124 *modedb = (struct fb_videomode *) gx_dcon_modedb; ··· 130 129 } 131 130 132 131 #else 133 - static void __init get_modedb(struct fb_videomode **modedb, unsigned int *size) 132 + static void __devinit get_modedb(struct fb_videomode **modedb, 133 + unsigned int *size) 134 134 { 135 135 *modedb = (struct fb_videomode *) gx_modedb; 136 136 *size = ARRAY_SIZE(gx_modedb); ··· 228 226 return gx_blank_display(info, blank_mode); 229 227 } 230 228 231 - static int __init gxfb_map_video_memory(struct fb_info *info, struct pci_dev *dev) 229 + static int __devinit gxfb_map_video_memory(struct fb_info *info, 230 + struct pci_dev *dev) 232 231 { 233 232 struct gxfb_par *par = info->par; 234 233 int ret; ··· 293 290 .fb_imageblit = cfb_imageblit, 294 291 }; 295 292 296 - static struct fb_info * __init gxfb_init_fbinfo(struct device *dev) 293 + static struct fb_info *__devinit gxfb_init_fbinfo(struct device *dev) 297 294 { 298 295 struct gxfb_par *par; 299 296 struct fb_info *info; ··· 374 371 } 375 372 #endif 376 373 377 - static int __init gxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id) 374 + static int __devinit gxfb_probe(struct pci_dev *pdev, 375 + const struct pci_device_id *id) 378 376 { 379 377 struct gxfb_par *par; 380 378 struct fb_info *info; ··· 455 451 return ret; 456 452 } 457 453 458 - static void gxfb_remove(struct pci_dev *pdev) 454 + static void __devexit gxfb_remove(struct pci_dev *pdev) 459 455 { 460 456 struct fb_info *info = pci_get_drvdata(pdev); 461 457 struct gxfb_par *par = info->par;