Skip to content

Commit

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

* moving hga_default_var and hga_fix from .init.data to .devinit.data

* moving hga_detect() from .init.text to .devinit.text

* moving hga_fb_remove() from .text to .devexit.text

This fixes the following warnings issued by modpost:

WARNING: drivers/video/hgafb.o(.devinit.text+0x18): Section mismatch in referenc
e from the function hgafb_probe() to the function .init.text:hga_card_detect()
The function __devinit hgafb_probe() references
a function __init hga_card_detect().
If hga_card_detect is only used by hgafb_probe then
annotate hga_card_detect with a matching annotation.

WARNING: drivers/video/hgafb.o(.devinit.text+0xfe): Section mismatch in referenc
e from the function hgafb_probe() to the variable .init.data:hga_fix
The function __devinit hgafb_probe() references
a variable __initdata hga_fix.
If hga_fix is only used by hgafb_probe then
annotate hga_fix with a matching annotation.

WARNING: drivers/video/hgafb.o(.devinit.text+0x105): Section mismatch in reference from the function hgafb_probe() to the variable .init.data:hga_default_var
The function __devinit hgafb_probe() references
a variable __initdata hga_default_var.
If hga_default_var is only used by hgafb_probe then
annotate hga_default_var 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 bd9b5ca commit e217e6e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/video/hgafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static DEFINE_SPINLOCK(hga_reg_lock);

/* Framebuffer driver structures */

static struct fb_var_screeninfo __initdata hga_default_var = {
static struct fb_var_screeninfo hga_default_var __devinitdata = {
.xres = 720,
.yres = 348,
.xres_virtual = 720,
Expand All @@ -120,7 +120,7 @@ static struct fb_var_screeninfo __initdata hga_default_var = {
.width = -1,
};

static struct fb_fix_screeninfo __initdata hga_fix = {
static struct fb_fix_screeninfo hga_fix __devinitdata = {
.id = "HGA",
.type = FB_TYPE_PACKED_PIXELS, /* (not sure) */
.visual = FB_VISUAL_MONO10,
Expand Down Expand Up @@ -276,7 +276,7 @@ static void hga_blank(int blank_mode)
spin_unlock_irqrestore(&hga_reg_lock, flags);
}

static int __init hga_card_detect(void)
static int __devinit hga_card_detect(void)
{
int count = 0;
void __iomem *p, *q;
Expand Down Expand Up @@ -596,7 +596,7 @@ static int __devinit hgafb_probe(struct platform_device *pdev)
return 0;
}

static int hgafb_remove(struct platform_device *pdev)
static int __devexit hgafb_remove(struct platform_device *pdev)
{
struct fb_info *info = platform_get_drvdata(pdev);

Expand All @@ -621,7 +621,7 @@ static int hgafb_remove(struct platform_device *pdev)

static struct platform_driver hgafb_driver = {
.probe = hgafb_probe,
.remove = hgafb_remove,
.remove = __devexit_p(hgafb_remove),
.driver = {
.name = "hgafb",
},
Expand Down

0 comments on commit e217e6e

Please sign in to comment.