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

sgivwfb: fix sections

Since the drivers probe call was changed from .init.text to .devinit.text
in commit c2e13037e6794bd0d9de3f9ecabf5615f15c160b ("platform-drivers:
move probe to .devinit.text in drivers/video") the fb_fix_screeninfo and
fb_var_screeninfo structures must be changed from .init.data to
.devinit.data, too.

Also the drivers remove routine should be moved from .text to .devexit.text

It removes these 7 section mismatch warnings from modpost:

WARNING: vmlinux.o(.devinit.text+0x1e28): Section mismatch in reference from the function sgivwfb_probe() to the variable .init.data:sgivwfb_fix
The function __devinit sgivwfb_probe() references
a variable __initdata sgivwfb_fix.
If sgivwfb_fix is only used by sgivwfb_probe then
annotate sgivwfb_fix with a matching annotation.

WARNING: vmlinux.o(.devinit.text+0x1e50): Section mismatch in reference from the function sgivwfb_probe() to the (unknown reference) .init.data:(unknown)
The function __devinit sgivwfb_probe() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by sgivwfb_probe then
annotate (unknown) with a matching annotation.

WARNING: vmlinux.o(.devinit.text+0x1e59): Section mismatch in reference from the function sgivwfb_probe() to the (unknown reference) .init.data:(unknown)
The function __devinit sgivwfb_probe() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by sgivwfb_probe then
annotate (unknown) with a matching annotation.

WARNING: vmlinux.o(.devinit.text+0x1e60): Section mismatch in reference from the function sgivwfb_probe() to the variable .init.data:sgivwfb_fix
The function __devinit sgivwfb_probe() references
a variable __initdata sgivwfb_fix.
If sgivwfb_fix is only used by sgivwfb_probe then
annotate sgivwfb_fix with a matching annotation.

WARNING: vmlinux.o(.devinit.text+0x1e6a): Section mismatch in reference from the function sgivwfb_probe() to the (unknown reference) .init.data:(unknown)
The function __devinit sgivwfb_probe() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by sgivwfb_probe then
annotate (unknown) with a matching annotation.

WARNING: vmlinux.o(.devinit.text+0x1e7f): Section mismatch in reference from the function sgivwfb_probe() to the variable .init.data:sgivwfb_var1600sw
The function __devinit sgivwfb_probe() references
a variable __initdata sgivwfb_var1600sw.
If sgivwfb_var1600sw is only used by sgivwfb_probe then
annotate sgivwfb_var1600sw with a matching annotation.

WARNING: vmlinux.o(.devinit.text+0x1e91): Section mismatch in reference from the function sgivwfb_probe() to the variable .init.data:sgivwfb_var
The function __devinit sgivwfb_probe() references
a variable __initdata sgivwfb_var.
If sgivwfb_var is only used by sgivwfb_probe then
annotate sgivwfb_var with a matching annotation.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Henrik Kretzschmar and committed by
Linus Torvalds
0d5b0264 a8ce4be7

+5 -5
+5 -5
drivers/video/sgivwfb.c
··· 47 47 48 48 static int flatpanel_id = -1; 49 49 50 - static struct fb_fix_screeninfo sgivwfb_fix __initdata = { 50 + static struct fb_fix_screeninfo sgivwfb_fix __devinitdata = { 51 51 .id = "SGI Vis WS FB", 52 52 .type = FB_TYPE_PACKED_PIXELS, 53 53 .visual = FB_VISUAL_PSEUDOCOLOR, ··· 57 57 .line_length = 640, 58 58 }; 59 59 60 - static struct fb_var_screeninfo sgivwfb_var __initdata = { 60 + static struct fb_var_screeninfo sgivwfb_var __devinitdata = { 61 61 /* 640x480, 8 bpp */ 62 62 .xres = 640, 63 63 .yres = 480, ··· 79 79 .vmode = FB_VMODE_NONINTERLACED 80 80 }; 81 81 82 - static struct fb_var_screeninfo sgivwfb_var1600sw __initdata = { 82 + static struct fb_var_screeninfo sgivwfb_var1600sw __devinitdata = { 83 83 /* 1600x1024, 8 bpp */ 84 84 .xres = 1600, 85 85 .yres = 1024, ··· 825 825 return -ENXIO; 826 826 } 827 827 828 - static int sgivwfb_remove(struct platform_device *dev) 828 + static int __devexit sgivwfb_remove(struct platform_device *dev) 829 829 { 830 830 struct fb_info *info = platform_get_drvdata(dev); 831 831 ··· 845 845 846 846 static struct platform_driver sgivwfb_driver = { 847 847 .probe = sgivwfb_probe, 848 - .remove = sgivwfb_remove, 848 + .remove = __devexit_p(sgivwfb_remove), 849 849 .driver = { 850 850 .name = "sgivwfb", 851 851 },