* [PATCH] ARM: OMAP: Fix section mismatch warnings in omap-rng
@ 2007-01-04 15:32 Dirk Behme
2007-01-05 16:49 ` Felipe Balbi
0 siblings, 1 reply; 4+ messages in thread
From: Dirk Behme @ 2007-01-04 15:32 UTC (permalink / raw)
To: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 373 bytes --]
ARM: OMAP: Fix warnings
WARNING: drivers/char/hw_random/omap-rng.o - Section
mismatch: reference to .init.text: from .data between '$d'
(at offset 0x0) and 'omap_rng_ops'
WARNING: drivers/char/hw_random/omap-rng.o - Section
mismatch: reference to .exit.text: from .data between '$d'
(at offset 0x4) and 'omap_rng_ops'
Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
[-- Attachment #2: omap_rng_warning_fix.txt --]
[-- Type: text/plain, Size: 762 bytes --]
Index: linux-osk/drivers/char/hw_random/omap-rng.c
===================================================================
--- linux-osk.orig/drivers/char/hw_random/omap-rng.c
+++ linux-osk/drivers/char/hw_random/omap-rng.c
@@ -83,7 +83,7 @@ static struct hwrng omap_rng_ops = {
.data_read = omap_rng_data_read,
};
-static int __init omap_rng_probe(struct platform_device *pdev)
+static int __devinit omap_rng_probe(struct platform_device *pdev)
{
struct resource *res, *mem;
int ret;
@@ -133,7 +133,7 @@ static int __init omap_rng_probe(struct
return 0;
}
-static int __exit omap_rng_remove(struct platform_device *pdev)
+static int __devexit omap_rng_remove(struct platform_device *pdev)
{
struct resource *mem = dev_get_drvdata(&pdev->dev);
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: OMAP: Fix section mismatch warnings in omap-rng
2007-01-05 16:49 ` Felipe Balbi
@ 2007-01-04 17:04 ` Dirk Behme
2007-01-04 18:01 ` David Brownell
0 siblings, 1 reply; 4+ messages in thread
From: Dirk Behme @ 2007-01-04 17:04 UTC (permalink / raw)
To: Felipe Balbi, linux-omap-open-source
Felipe Balbi wrote:
> Hello Dirk,
>
>
>>-static int __init omap_rng_probe(struct platform_device *pdev)
>>+static int __devinit omap_rng_probe(struct platform_device *pdev)
>>-static int __exit omap_rng_remove(struct platform_device *pdev)
>>+static int __devexit omap_rng_remove(struct platform_device *pdev)
>
>
> Actually, this will only be true if CONFIG_HOTPLUG is set to "y". This
> way __devinit is defined to "null".
>
> If we set CONFIG_HOTPLUG to "n" the same Section mismatch issue will
> appear.
Ah, yes, I see. Anybody with a better patch for this?
Thanks
Dirk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: OMAP: Fix section mismatch warnings in omap-rng
2007-01-04 17:04 ` Dirk Behme
@ 2007-01-04 18:01 ` David Brownell
0 siblings, 0 replies; 4+ messages in thread
From: David Brownell @ 2007-01-04 18:01 UTC (permalink / raw)
To: linux-omap-open-source, felipe.lima, dirk.behme
> Ah, yes, I see. Anybody with a better patch for this?
How about this.
======== CUT HERE
Keep omap_rng_probe() out of its platform_driver, addressing a
section mismatch problem.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Index: osk2/drivers/char/hw_random/omap-rng.c
===================================================================
--- osk2.orig/drivers/char/hw_random/omap-rng.c 2006-12-30 14:59:25.000000000 -0800
+++ osk2/drivers/char/hw_random/omap-rng.c 2007-01-04 09:55:58.000000000 -0800
@@ -179,7 +179,6 @@ static struct platform_driver omap_rng_d
.name = "omap_rng",
.owner = THIS_MODULE,
},
- .probe = omap_rng_probe,
.remove = __exit_p(omap_rng_remove),
.suspend = omap_rng_suspend,
.resume = omap_rng_resume
@@ -190,7 +189,7 @@ static int __init omap_rng_init(void)
if (!cpu_is_omap16xx() && !cpu_is_omap24xx())
return -ENODEV;
- return platform_driver_register(&omap_rng_driver);
+ return platform_driver_probe(&omap_rng_driver, omap_rng_probe);
}
static void __exit omap_rng_exit(void)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: OMAP: Fix section mismatch warnings in omap-rng
2007-01-04 15:32 [PATCH] ARM: OMAP: Fix section mismatch warnings in omap-rng Dirk Behme
@ 2007-01-05 16:49 ` Felipe Balbi
2007-01-04 17:04 ` Dirk Behme
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2007-01-05 16:49 UTC (permalink / raw)
To: ext Dirk Behme; +Cc: linux-omap-open-source
Hello Dirk,
> -static int __init omap_rng_probe(struct platform_device *pdev)
> +static int __devinit omap_rng_probe(struct platform_device *pdev)
> -static int __exit omap_rng_remove(struct platform_device *pdev)
> +static int __devexit omap_rng_remove(struct platform_device *pdev)
Actually, this will only be true if CONFIG_HOTPLUG is set to "y". This
way __devinit is defined to "null".
If we set CONFIG_HOTPLUG to "n" the same Section mismatch issue will
appear.
Maybe this is not the better way to do it.
--
Best Regards,
Felipe Balbi
felipe.lima@indt.org.br
Nokia Institute of Technology - INdT
Kernel Developers Team
+55 92 8127 0839
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-01-05 16:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-04 15:32 [PATCH] ARM: OMAP: Fix section mismatch warnings in omap-rng Dirk Behme
2007-01-05 16:49 ` Felipe Balbi
2007-01-04 17:04 ` Dirk Behme
2007-01-04 18:01 ` David Brownell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox