From 9625b51350ccb4db60b743f0d1e5ab696e77ef58 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 26 Jul 2010 19:08:14 +0100 Subject: [PATCH] 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 --- drivers/video/pmag-ba-fb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/pmag-ba-fb.c b/drivers/video/pmag-ba-fb.c index 0f361b6100d2..0c69fa20251b 100644 --- a/drivers/video/pmag-ba-fb.c +++ b/drivers/video/pmag-ba-fb.c @@ -44,7 +44,7 @@ struct pmagbafb_par { }; -static struct fb_var_screeninfo pmagbafb_defined __initdata = { +static struct fb_var_screeninfo pmagbafb_defined __devinitdata = { .xres = 1024, .yres = 864, .xres_virtual = 1024, @@ -68,7 +68,7 @@ static struct fb_var_screeninfo pmagbafb_defined __initdata = { .vmode = FB_VMODE_NONINTERLACED, }; -static struct fb_fix_screeninfo pmagbafb_fix __initdata = { +static struct fb_fix_screeninfo pmagbafb_fix __devinitdata = { .id = "PMAG-BA", .smem_len = (1024 * 1024), .type = FB_TYPE_PACKED_PIXELS, @@ -142,7 +142,7 @@ static void __init pmagbafb_erase_cursor(struct fb_info *info) } -static int __init pmagbafb_probe(struct device *dev) +static int __devinit pmagbafb_probe(struct device *dev) { struct tc_dev *tdev = to_tc_dev(dev); resource_size_t start, len; -- 2.20.1