Skip to content

Commit

Permalink
fbdev: section cleanup in arcfb
Browse files Browse the repository at this point in the history
Fix the sections in the arcfb driver, by moving:

*	the variables arcfb_fix and arcfb_var from .init.data to .devinit.data

*	arcfb_remove() from .text to .devexit.text

This fixes the following warnings issued by modpost:

WARNING: drivers/video/built-in.o(.devinit.text+0x543): Section mismatch in reference from the function arcfb_probe() to the variable .init.data:arcfb_var
The function __devinit arcfb_probe() references
a variable __initdata arcfb_var.
If arcfb_var is only used by arcfb_probe then
annotate arcfb_var with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x558): Section mismatch in reference from the function arcfb_probe() to the variable .init.data:arcfb_fix
The function __devinit arcfb_probe() references
a variable __initdata arcfb_fix.
If arcfb_fix is only used by arcfb_probe then
annotate arcfb_fix with a matching annotation.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: <stable@kernel.org>	[if "platform-drivers: move probe to .devinit.text in drivers/video" was merged]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Henrik Kretzschmar authored and Linus Torvalds committed May 25, 2010
1 parent dbd536b commit bd9b5ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/video/arcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct arcfb_par {
spinlock_t lock;
};

static struct fb_fix_screeninfo arcfb_fix __initdata = {
static struct fb_fix_screeninfo arcfb_fix __devinitdata = {
.id = "arcfb",
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_MONO01,
Expand All @@ -90,7 +90,7 @@ static struct fb_fix_screeninfo arcfb_fix __initdata = {
.accel = FB_ACCEL_NONE,
};

static struct fb_var_screeninfo arcfb_var __initdata = {
static struct fb_var_screeninfo arcfb_var __devinitdata = {
.xres = 128,
.yres = 64,
.xres_virtual = 128,
Expand Down Expand Up @@ -588,7 +588,7 @@ static int __devinit arcfb_probe(struct platform_device *dev)
return retval;
}

static int arcfb_remove(struct platform_device *dev)
static int __devexit arcfb_remove(struct platform_device *dev)
{
struct fb_info *info = platform_get_drvdata(dev);

Expand All @@ -602,7 +602,7 @@ static int arcfb_remove(struct platform_device *dev)

static struct platform_driver arcfb_driver = {
.probe = arcfb_probe,
.remove = arcfb_remove,
.remove = __devexit_p(arcfb_remove),
.driver = {
.name = "arcfb",
},
Expand Down

0 comments on commit bd9b5ca

Please sign in to comment.