lkml.org 
[lkml]   [2010]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] VIDEO: sa1100fb: register driver using platform_driver_probe
Date
This fixes

WARNING: vmlinux.o(.devinit.text+0x364): Section mismatch in reference from the function sa1100fb_probe() to the function .init.text:sa1100fb_init_fbinfo()
The function __devinit sa1100fb_probe() references
a function __init sa1100fb_init_fbinfo().
If sa1100fb_init_fbinfo is only used by sa1100fb_probe then
annotate sa1100fb_init_fbinfo with a matching annotation.

Commit c2e13037e6794bd0d9de3f9ecabf5615f15c160b addressed a section
mismatch in this driver but introduced new ones as sa1100fb_probe
references many more .init variables and functions (some of them
indirectly) so using platform_driver_probe is less intrusive.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/video/sa1100fb.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
index e8b76d6..35fc741 100644
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -1351,7 +1351,6 @@ static struct fb_monspecs monspecs __initdata = {
.vfmax = 65,
};

-
static struct sa1100fb_info * __init sa1100fb_init_fbinfo(struct device *dev)
{
struct sa1100fb_mach_info *inf;
@@ -1435,7 +1434,7 @@ static struct sa1100fb_info * __init sa1100fb_init_fbinfo(struct device *dev)
return fbi;
}

-static int __devinit sa1100fb_probe(struct platform_device *pdev)
+static int __init sa1100fb_probe(struct platform_device *pdev)
{
struct sa1100fb_info *fbi;
int ret, irq;
@@ -1501,7 +1500,6 @@ static int __devinit sa1100fb_probe(struct platform_device *pdev)
}

static struct platform_driver sa1100fb_driver = {
- .probe = sa1100fb_probe,
.suspend = sa1100fb_suspend,
.resume = sa1100fb_resume,
.driver = {
@@ -1514,7 +1512,7 @@ int __init sa1100fb_init(void)
if (fb_get_options("sa1100fb", NULL))
return -ENODEV;

- return platform_driver_register(&sa1100fb_driver);
+ return platform_driver_probe(&sa1100fb_driver, sa1100fb_probe);
}

int __init sa1100fb_setup(char *options)
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-07-30 20:47    [W:0.025 / U:1.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site