Skip to content

Commit

Permalink
init.h: document the existence of __initconst
Browse files Browse the repository at this point in the history
Initdata can be const since more than 5 years, using the __initconst
keyword.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Geert Uytterhoeven authored and Linus Torvalds committed Nov 13, 2013
1 parent 67347fe commit 6532154
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions include/linux/init.h
Original file line number Diff line number Diff line change
@@ -26,17 +26,15 @@
* extern int initialize_foobar_device(int, int, int) __init;
*
* For initialized data:
* You should insert __initdata between the variable name and equal
* sign followed by value, e.g.:
* You should insert __initdata or __initconst between the variable name
* and equal sign followed by value, e.g.:
*
* static int init_variable __initdata = 0;
* static const char linux_logo[] __initconst = { 0x32, 0x36, ... };
*
* Don't forget to initialize data not at file scope, i.e. within a function,
* as gcc otherwise puts the data into the bss section and not into the init
* section.
*
* Also note, that this data cannot be "const".
*/

/* These are for everybody (although not all archs will actually

0 comments on commit 6532154

Please sign in to comment.