* [2.6 patch] drivers/input/misc/wistron_btns.c: section fixes
@ 2006-06-26 10:35 Adrian Bunk
2006-06-26 11:50 ` Dmitry Torokhov
0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2006-06-26 10:35 UTC (permalink / raw)
To: mitr; +Cc: dtor_core, linux-input, linux-kernel
This patch contains the following fixes:
- it doesn't make sense to mark a variable on the stack as __initdata
- struct dmi_ids is using the __init dmi_matched()
since the only user of struct dmi_ids is the __init select_keymap(),
the solution is to make struct dmi_ids __initdata
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/input/misc/wistron_btns.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.17-mm2-full/drivers/input/misc/wistron_btns.c.old 2006-06-26 02:03:20.000000000 +0200
+++ linux-2.6.17-mm2-full/drivers/input/misc/wistron_btns.c 2006-06-26 02:07:58.000000000 +0200
@@ -94,7 +94,7 @@
static ssize_t __init locate_wistron_bios(void __iomem *base)
{
- static const unsigned char __initdata signature[] =
+ static const unsigned char signature[] =
{ 0x42, 0x21, 0x55, 0x30 };
ssize_t offset;
@@ -333,7 +333,7 @@
* a list of buttons and their key codes (reported when loading this module
* with force=1) and the output of dmidecode to $MODULE_AUTHOR.
*/
-static struct dmi_system_id dmi_ids[] = {
+static struct dmi_system_id __initdata dmi_ids[] = {
{
.callback = dmi_matched,
.ident = "Fujitsu-Siemens Amilo Pro V2000",
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [2.6 patch] drivers/input/misc/wistron_btns.c: section fixes
2006-06-26 10:35 [2.6 patch] drivers/input/misc/wistron_btns.c: section fixes Adrian Bunk
@ 2006-06-26 11:50 ` Dmitry Torokhov
2006-06-26 14:10 ` Dmitry Torokhov
2006-06-29 16:49 ` Adrian Bunk
0 siblings, 2 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2006-06-26 11:50 UTC (permalink / raw)
To: Adrian Bunk; +Cc: mitr, linux-input, linux-kernel
On Monday 26 June 2006 06:35, Adrian Bunk wrote:
> This patch contains the following fixes:
> - it doesn't make sense to mark a variable on the stack as __initdata
> - struct dmi_ids is using the __init dmi_matched()
Since when did static variables become allocated on stack?
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [2.6 patch] drivers/input/misc/wistron_btns.c: section fixes
2006-06-26 11:50 ` Dmitry Torokhov
@ 2006-06-26 14:10 ` Dmitry Torokhov
2006-06-29 16:49 ` Adrian Bunk
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2006-06-26 14:10 UTC (permalink / raw)
To: Adrian Bunk; +Cc: mitr, linux-input, linux-kernel
On 6/26/06, Dmitry Torokhov <dtor_core@ameritech.net> wrote:
> On Monday 26 June 2006 06:35, Adrian Bunk wrote:
> > This patch contains the following fixes:
> > - it doesn't make sense to mark a variable on the stack as __initdata
> > - struct dmi_ids is using the __init dmi_matched()
>
> Since when did static variables become allocated on stack?
>
BTW, if I add __intidata to dmi_ids array GCC (3.4.4) bitches at me:
CC drivers/input/misc/wistron_btns.o
drivers/input/misc/wistron_btns.c:345: error: dmi_ids causes a section
type conflict
make[1]: *** [drivers/input/misc/wistron_btns.o] Error 1
make: *** [drivers/input/misc/] Error 2
I have to declare it as "static const struct dmi_system_id __initdata
dmi_ids[] = {..." for it to compile successfully, but there is a
comment that we should not use const with __initdata. Although I
checked the assembly oputput and const __initdata endes up in
init.data section - exactly where we want it. Wierd...
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [2.6 patch] drivers/input/misc/wistron_btns.c: section fixes
2006-06-26 11:50 ` Dmitry Torokhov
2006-06-26 14:10 ` Dmitry Torokhov
@ 2006-06-29 16:49 ` Adrian Bunk
1 sibling, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2006-06-29 16:49 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: mitr, linux-input, linux-kernel
On Mon, Jun 26, 2006 at 07:50:31AM -0400, Dmitry Torokhov wrote:
> On Monday 26 June 2006 06:35, Adrian Bunk wrote:
> > This patch contains the following fixes:
> > - it doesn't make sense to mark a variable on the stack as __initdata
> > - struct dmi_ids is using the __init dmi_matched()
>
> Since when did static variables become allocated on stack?
Only when I miss the static...
> Dmitry
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-29 16:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-26 10:35 [2.6 patch] drivers/input/misc/wistron_btns.c: section fixes Adrian Bunk
2006-06-26 11:50 ` Dmitry Torokhov
2006-06-26 14:10 ` Dmitry Torokhov
2006-06-29 16:49 ` Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox