make riscom8.c build (248p4)
PATCH 1/1 make riscom8.c build (248p4)
Hi.
The following patch is needed for me to be able to compile drivers/char/riscom8.c. I am not exactly sure where it is that the init.data section has been asked to hold rw data before but I trust gcc to know this better than me...
drivers/char/riscom8.c Sun Aug 5 18:14:29 2001 renamed from drivers/char/riscom8.c Sun Aug 5 14:34:54 2001 +2 -2
@@ -1866,10 +1866,10 @@ __setup("riscom8=", riscom8_setup); #endif -static const char banner[] __initdata = +static char banner[] __initdata = KERN_INFO "rc: SDL RISCom/8 card driver v1.1, (c) D.Gorodchanin " "1994-1996.\n"; -static const char no_boards_msg[] __initdata = +static char no_boards_msg[] __initdata = KERN_INFO "rc: No RISCom/8 boards detected.\n"; /*
Signature · 5 lines
Rasmus([email protected]) Duct tape is like the force; it has a light side and a dark side, and it holds the universe together. -- Anonymous
Quoted 4 lines · Rasmus Andersen
drivers/char/riscom8.c Sun Aug 5 18:14:29 2001 renamed from drivers/char/riscom8.c Sun Aug 5 14:34:54 2001 +0
-0@@ -1866,10 +1866,10 @@ __setup("riscom8=", riscom8_setup);
drivers/char/riscom8.c Sun Aug 5 18:14:29 2001 line 1874
Quoted 10 lines
drivers/char/riscom8.c Sun Aug 5 18:14:29 2001 renamed from drivers/char/riscom8.c Sun Aug 5 14:34:54 2001 +2
-2#endif -static const char banner[] __initdata = +static char banner[] __initdata = KERN_INFO "rc: SDL RISCom/8 card driver v1.1, (c) D.Gorodchanin " "1994-1996.\n"; -static const char no_boards_msg[] __initdata = +static char no_boards_msg[] __initdata = KERN_INFO "rc: No RISCom/8 boards detected.\n";
It is even documented in Documentation/DocBook/kernel-hacking.tmpl that __initdata cannot be const. Not all versions of gcc flag an error, newer ones do.