diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2014-12-03 17:59:49 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-12-03 18:28:27 -0500 |
commit | e147af492e6c80855550908c86d6d11a501cbfaf (patch) | |
tree | 0ba34a7bbea6e8a2a36c188439fffd4390d312e2 | |
parent | 545e625325c5850a506b116788e6045aac69cc36 (diff) |
Input: amikbd - allocate temporary keymap buffer on the stack
Allocate the temporary buffer needed for initialization of the console
keyboard maps (512 bytes, as NR_KEYS = 256) on the stack instead of
statically, to reduce kernel size.
add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-512 (-512)
function old new delta
temp_map 512 - -512
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/keyboard/amikbd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/keyboard/amikbd.c b/drivers/input/keyboard/amikbd.c index 4f81e65d9e35..3196f2d29ade 100644 --- a/drivers/input/keyboard/amikbd.c +++ b/drivers/input/keyboard/amikbd.c | |||
@@ -147,10 +147,11 @@ static unsigned char amikbd_keycode[0x78] __initdata = { | |||
147 | 147 | ||
148 | static void __init amikbd_init_console_keymaps(void) | 148 | static void __init amikbd_init_console_keymaps(void) |
149 | { | 149 | { |
150 | /* We can spare 512 bytes on stack for temp_map in init path. */ | ||
151 | unsigned short temp_map[NR_KEYS]; | ||
150 | int i, j; | 152 | int i, j; |
151 | 153 | ||
152 | for (i = 0; i < MAX_NR_KEYMAPS; i++) { | 154 | for (i = 0; i < MAX_NR_KEYMAPS; i++) { |
153 | static u_short temp_map[NR_KEYS] __initdata; | ||
154 | if (!key_maps[i]) | 155 | if (!key_maps[i]) |
155 | continue; | 156 | continue; |
156 | memset(temp_map, 0, sizeof(temp_map)); | 157 | memset(temp_map, 0, sizeof(temp_map)); |