Skip to content

Commit 9625b51

Browse files
committed
VIDEO: PMAG-BA: Fix section mismatch
WARNING: drivers/video/built-in.o(.data+0x1e0): Section mismatch in reference fr om the variable pmagbafb_driver to the function .init.text:pmagbafb_probe() The variable pmagbafb_driver references the function __init pmagbafb_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, Fixing this one triggers 2 more: WARNING: drivers/video/built-in.o(.devinit.text+0xc0): Section mismatch in reference from the function pmagbafb_probe() to the variable .init.data:pmagbafb_fix The function __devinit pmagbafb_probe() references a variable __initdata pmagbafb_fix. If pmagbafb_fix is only used by pmagbafb_probe then annotate pmagbafb_fix with a matching annotation. WARNING: drivers/video/built-in.o(.devinit.text+0x108): Section mismatch in reference from the function pmagbafb_probe() to the variable .init.data:pmagbafb_defined The function __devinit pmagbafb_probe() references a variable __initdata pmagbafb_defined. If pmagbafb_defined is only used by pmagbafb_probe then annotate pmagbafb_defined with a matching annotation. Signed-off-by: Ralf Baechle <[email protected]>
1 parent 3852cc3 commit 9625b51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/video/pmag-ba-fb.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct pmagbafb_par {
4444
};
4545

4646

47-
static struct fb_var_screeninfo pmagbafb_defined __initdata = {
47+
static struct fb_var_screeninfo pmagbafb_defined __devinitdata = {
4848
.xres = 1024,
4949
.yres = 864,
5050
.xres_virtual = 1024,
@@ -68,7 +68,7 @@ static struct fb_var_screeninfo pmagbafb_defined __initdata = {
6868
.vmode = FB_VMODE_NONINTERLACED,
6969
};
7070

71-
static struct fb_fix_screeninfo pmagbafb_fix __initdata = {
71+
static struct fb_fix_screeninfo pmagbafb_fix __devinitdata = {
7272
.id = "PMAG-BA",
7373
.smem_len = (1024 * 1024),
7474
.type = FB_TYPE_PACKED_PIXELS,
@@ -142,7 +142,7 @@ static void __init pmagbafb_erase_cursor(struct fb_info *info)
142142
}
143143

144144

145-
static int __init pmagbafb_probe(struct device *dev)
145+
static int __devinit pmagbafb_probe(struct device *dev)
146146
{
147147
struct tc_dev *tdev = to_tc_dev(dev);
148148
resource_size_t start, len;

0 commit comments

Comments
 (0)