Skip to content

Commit

Permalink
vgacon: use slab allocator instead of the bootmem allocator
Browse files Browse the repository at this point in the history
Slab is initialized before the console subsystem so use the slab allocator in
vgacon_scrollback_startup().

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
  • Loading branch information
Pekka Enberg committed Jun 11, 2009
1 parent 22fb4e7 commit b8ec757
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/video/console/vgacon.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static inline void vga_set_mem_top(struct vc_data *c)
}

#ifdef CONFIG_VGACON_SOFT_SCROLLBACK
#include <linux/bootmem.h>
#include <linux/slab.h>
/* software scrollback */
static void *vgacon_scrollback;
static int vgacon_scrollback_tail;
Expand Down Expand Up @@ -210,8 +210,7 @@ static void vgacon_scrollback_init(int pitch)
*/
static void __init_refok vgacon_scrollback_startup(void)
{
vgacon_scrollback = alloc_bootmem(CONFIG_VGACON_SOFT_SCROLLBACK_SIZE
* 1024);
vgacon_scrollback = kcalloc(CONFIG_VGACON_SOFT_SCROLLBACK_SIZE, 1024, GFP_NOWAIT);
vgacon_scrollback_init(vga_video_num_columns * 2);
}

Expand Down

0 comments on commit b8ec757

Please sign in to comment.