Commit b8ec7573 authored by Pekka Enberg's avatar Pekka Enberg

vgacon: use slab allocator instead of the bootmem allocator

Slab is initialized before the console subsystem so use the slab allocator in
vgacon_scrollback_startup().
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
parent 22fb4e71
...@@ -180,7 +180,7 @@ static inline void vga_set_mem_top(struct vc_data *c) ...@@ -180,7 +180,7 @@ static inline void vga_set_mem_top(struct vc_data *c)
} }
#ifdef CONFIG_VGACON_SOFT_SCROLLBACK #ifdef CONFIG_VGACON_SOFT_SCROLLBACK
#include <linux/bootmem.h> #include <linux/slab.h>
/* software scrollback */ /* software scrollback */
static void *vgacon_scrollback; static void *vgacon_scrollback;
static int vgacon_scrollback_tail; static int vgacon_scrollback_tail;
...@@ -210,8 +210,7 @@ static void vgacon_scrollback_init(int pitch) ...@@ -210,8 +210,7 @@ static void vgacon_scrollback_init(int pitch)
*/ */
static void __init_refok vgacon_scrollback_startup(void) static void __init_refok vgacon_scrollback_startup(void)
{ {
vgacon_scrollback = alloc_bootmem(CONFIG_VGACON_SOFT_SCROLLBACK_SIZE vgacon_scrollback = kcalloc(CONFIG_VGACON_SOFT_SCROLLBACK_SIZE, 1024, GFP_NOWAIT);
* 1024);
vgacon_scrollback_init(vga_video_num_columns * 2); vgacon_scrollback_init(vga_video_num_columns * 2);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment