Since the drivers probe call was changed from .init.text
to .devinit.text in commit c2e13037e6794bd0d9de3f9ecabf5615f15c160b
the fb_fix_screeninfo structure must be
changed from .init.data to .devinit.data, too.
Signed-off-by: Henrik Kretzschmar <[email protected]>
---
It would be nice if someone with a MIPS gcc could test this patch and
give me some feedback if it works the way it should, since atm I'm lacking
a crosscompiler setup.
---
drivers/video/cobalt_lcdfb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/cobalt_lcdfb.c b/drivers/video/cobalt_lcdfb.c
index 5eb61b5..42fe155 100644
--- a/drivers/video/cobalt_lcdfb.c
+++ b/drivers/video/cobalt_lcdfb.c
@@ -123,7 +123,7 @@ static void lcd_clear(struct fb_info *info)
lcd_write_control(info, LCD_RESET);
}
-static struct fb_fix_screeninfo cobalt_lcdfb_fix __initdata = {
+static struct fb_fix_screeninfo cobalt_lcdfb_fix __devinitdata = {
.id = "cobalt-lcd",
.type = FB_TYPE_TEXT,
.type_aux = FB_AUX_TEXT_MDA,
--
1.7.0
Since the drivers probe call was changed from .init.text
to .devinit.text in commit c2e13037e6794bd0d9de3f9ecabf5615f15c160b
the fb_fix_screeninfo and fb_var_screeninfo structures must be
changed from .init.data to .devinit.data, too.
Also the drivers remove routine should be moved from .text to .devexit.text
It removes these 7 section mismatch warnings from modpost:
WARNING: vmlinux.o(.devinit.text+0x1e28): Section mismatch in reference from the function sgivwfb_probe() to the variable .init.data:sgivwfb_fix
The function __devinit sgivwfb_probe() references
a variable __initdata sgivwfb_fix.
If sgivwfb_fix is only used by sgivwfb_probe then
annotate sgivwfb_fix with a matching annotation.
WARNING: vmlinux.o(.devinit.text+0x1e50): Section mismatch in reference from the function sgivwfb_probe() to the (unknown reference) .init.data:(unknown)
The function __devinit sgivwfb_probe() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by sgivwfb_probe then
annotate (unknown) with a matching annotation.
WARNING: vmlinux.o(.devinit.text+0x1e59): Section mismatch in reference from the function sgivwfb_probe() to the (unknown reference) .init.data:(unknown)
The function __devinit sgivwfb_probe() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by sgivwfb_probe then
annotate (unknown) with a matching annotation.
WARNING: vmlinux.o(.devinit.text+0x1e60): Section mismatch in reference from the function sgivwfb_probe() to the variable .init.data:sgivwfb_fix
The function __devinit sgivwfb_probe() references
a variable __initdata sgivwfb_fix.
If sgivwfb_fix is only used by sgivwfb_probe then
annotate sgivwfb_fix with a matching annotation.
WARNING: vmlinux.o(.devinit.text+0x1e6a): Section mismatch in reference from the function sgivwfb_probe() to the (unknown reference) .init.data:(unknown)
The function __devinit sgivwfb_probe() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by sgivwfb_probe then
annotate (unknown) with a matching annotation.
WARNING: vmlinux.o(.devinit.text+0x1e7f): Section mismatch in reference from the function sgivwfb_probe() to the variable .init.data:sgivwfb_var1600sw
The function __devinit sgivwfb_probe() references
a variable __initdata sgivwfb_var1600sw.
If sgivwfb_var1600sw is only used by sgivwfb_probe then
annotate sgivwfb_var1600sw with a matching annotation.
WARNING: vmlinux.o(.devinit.text+0x1e91): Section mismatch in reference from the function sgivwfb_probe() to the variable .init.data:sgivwfb_var
The function __devinit sgivwfb_probe() references
a variable __initdata sgivwfb_var.
If sgivwfb_var is only used by sgivwfb_probe then
annotate sgivwfb_var with a matching annotation.
Signed-off-by: Henrik Kretzschmar <[email protected]>
---
This patch is compile tested.
---
drivers/video/sgivwfb.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c
index 7a3a5e2..53455f2 100644
--- a/drivers/video/sgivwfb.c
+++ b/drivers/video/sgivwfb.c
@@ -47,7 +47,7 @@ static int ywrap = 0;
static int flatpanel_id = -1;
-static struct fb_fix_screeninfo sgivwfb_fix __initdata = {
+static struct fb_fix_screeninfo sgivwfb_fix __devinitdata = {
.id = "SGI Vis WS FB",
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_PSEUDOCOLOR,
@@ -57,7 +57,7 @@ static struct fb_fix_screeninfo sgivwfb_fix __initdata = {
.line_length = 640,
};
-static struct fb_var_screeninfo sgivwfb_var __initdata = {
+static struct fb_var_screeninfo sgivwfb_var __devinitdata = {
/* 640x480, 8 bpp */
.xres = 640,
.yres = 480,
@@ -79,7 +79,7 @@ static struct fb_var_screeninfo sgivwfb_var __initdata = {
.vmode = FB_VMODE_NONINTERLACED
};
-static struct fb_var_screeninfo sgivwfb_var1600sw __initdata = {
+static struct fb_var_screeninfo sgivwfb_var1600sw __devinitdata = {
/* 1600x1024, 8 bpp */
.xres = 1600,
.yres = 1024,
@@ -825,7 +825,7 @@ fail_ioremap_regs:
return -ENXIO;
}
-static int sgivwfb_remove(struct platform_device *dev)
+static int __devexit sgivwfb_remove(struct platform_device *dev)
{
struct fb_info *info = platform_get_drvdata(dev);
@@ -845,7 +845,7 @@ static int sgivwfb_remove(struct platform_device *dev)
static struct platform_driver sgivwfb_driver = {
.probe = sgivwfb_probe,
- .remove = sgivwfb_remove,
+ .remove = __devexit_p(sgivwfb_remove),
.driver = {
.name = "sgivwfb",
},
--
1.7.0
Since the drivers probe calls were changed from .init.text
to .devinit.text in commit c2e13037e6794bd0d9de3f9ecabf5615f15c160b
all the function from .init.text should be moved to .devinit.text, too.
The drivers remove calls can also be move from .text to .devexit.text.
Signed-off-by: Henrik Kretzschmar <[email protected]>
---
It would be nice if someone with an ARM gcc could test this patch and give
me some feedback if it works the way it should, since atm I'm lacking
a crosscompiler setup.
---
drivers/video/s3c2410fb.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index 2b094de..46b4309 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -631,7 +631,7 @@ static struct fb_ops s3c2410fb_ops = {
* cache. Once this area is remapped, all virtual memory
* access to the video memory should occur at the new region.
*/
-static int __init s3c2410fb_map_video_memory(struct fb_info *info)
+static int __devinit s3c2410fb_map_video_memory(struct fb_info *info)
{
struct s3c2410fb_info *fbi = info->par;
dma_addr_t map_dma;
@@ -814,7 +814,7 @@ static inline void s3c2410fb_cpufreq_deregister(struct s3c2410fb_info *info)
static char driver_name[] = "s3c2410fb";
-static int __init s3c24xxfb_probe(struct platform_device *pdev,
+static int __devinit s3c24xxfb_probe(struct platform_device *pdev,
enum s3c_drv_type drv_type)
{
struct s3c2410fb_info *info;
@@ -1018,7 +1018,7 @@ static int __devinit s3c2412fb_probe(struct platform_device *pdev)
/*
* Cleanup
*/
-static int s3c2410fb_remove(struct platform_device *pdev)
+static int __devexit s3c2410fb_remove(struct platform_device *pdev)
{
struct fb_info *fbinfo = platform_get_drvdata(pdev);
struct s3c2410fb_info *info = fbinfo->par;
@@ -1096,7 +1096,7 @@ static int s3c2410fb_resume(struct platform_device *dev)
static struct platform_driver s3c2410fb_driver = {
.probe = s3c2410fb_probe,
- .remove = s3c2410fb_remove,
+ .remove = __devexit_p(s3c2410fb_remove),
.suspend = s3c2410fb_suspend,
.resume = s3c2410fb_resume,
.driver = {
@@ -1107,7 +1107,7 @@ static struct platform_driver s3c2410fb_driver = {
static struct platform_driver s3c2412fb_driver = {
.probe = s3c2412fb_probe,
- .remove = s3c2410fb_remove,
+ .remove = __devexit_p(s3c2410fb_remove),
.suspend = s3c2410fb_suspend,
.resume = s3c2410fb_resume,
.driver = {
--
1.7.0
On Wed, Apr 28, 2010 at 12:25:02PM +0200, Henrik Kretzschmar wrote:
> Since the drivers probe call was changed from .init.text
> to .devinit.text in commit c2e13037e6794bd0d9de3f9ecabf5615f15c160b
> the fb_fix_screeninfo structure must be
> changed from .init.data to .devinit.data, too.
>
> Signed-off-by: Henrik Kretzschmar <[email protected]>
> ---
> It would be nice if someone with a MIPS gcc could test this patch and
> give me some feedback if it works the way it should, since atm I'm lacking
> a crosscompiler setup.
Works as advertised.
Tested-by: Ralf Baechle <[email protected]>
Ralf
Since the drivers probe call was changed from .init.text
to .devinit.text in commit c2e13037e6794bd0d9de3f9ecabf5615f15c160b
the fb_fix_screeninfo and fb_var_screeninfo structures must be
changed from .init.data to .devinit.data, too.
Also the drivers remove routine should be moved from
.exit.text to .devexit.text
Signed-off-by: Henrik Kretzschmar <[email protected]>
---
It would be nice if someone with a SH gcc could test this patch and
give me some feedback if it works the way it should, since atm I'm lacking
a crosscompiler setup.
---
drivers/video/hitfb.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c
index 393f3f3..cfb8d64 100644
--- a/drivers/video/hitfb.c
+++ b/drivers/video/hitfb.c
@@ -30,14 +30,14 @@
#define WIDTH 640
-static struct fb_var_screeninfo hitfb_var __initdata = {
+static struct fb_var_screeninfo hitfb_var __devinitdata = {
.activate = FB_ACTIVATE_NOW,
.height = -1,
.width = -1,
.vmode = FB_VMODE_NONINTERLACED,
};
-static struct fb_fix_screeninfo hitfb_fix __initdata = {
+static struct fb_fix_screeninfo hitfb_fix __devinitdata = {
.id = "Hitachi HD64461",
.type = FB_TYPE_PACKED_PIXELS,
.accel = FB_ACCEL_NONE,
@@ -417,7 +417,7 @@ err_fb:
return ret;
}
-static int __exit hitfb_remove(struct platform_device *dev)
+static int __devexit hitfb_remove(struct platform_device *dev)
{
struct fb_info *info = platform_get_drvdata(dev);
@@ -462,7 +462,7 @@ static const struct dev_pm_ops hitfb_dev_pm_ops = {
static struct platform_driver hitfb_driver = {
.probe = hitfb_probe,
- .remove = __exit_p(hitfb_remove),
+ .remove = __devexit_p(hitfb_remove),
.driver = {
.name = "hitfb",
.owner = THIS_MODULE,
--
1.7.0
Henrik Kretzschmar <[email protected]> writes:
> Since the drivers probe calls were changed from .init.text
> to .devinit.text in commit c2e13037e6794bd0d9de3f9ecabf5615f15c160b
> all the function from .init.text should be moved to .devinit.text, too.
>
> The drivers remove calls can also be move from .text to .devexit.text.
Build tested and booted on my h1940 with current git head
(1d16b0f2f3edf05f12a9e3960588e0d4854157bb).
Acked-by: Arnaud Patard <[email protected]>