X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fvideo%2Fvgastate.c;h=d94efafc77b57362ee8e29e8fdf2e118b69756a4;hb=bb648a0d22908116b4ef168935a160d7f17c4e6d;hp=ca92940f39438d9d7b4bffe0456815a2421b6b58;hpb=35d91f75c2c9548e606e813413f03c5cc35da969;p=linux-2.6-omap-h63xx.git diff --git a/drivers/video/vgastate.c b/drivers/video/vgastate.c index ca92940f394..d94efafc77b 100644 --- a/drivers/video/vgastate.c +++ b/drivers/video/vgastate.c @@ -13,7 +13,6 @@ * archive for more details. * */ -#include #include #include #include @@ -356,10 +355,11 @@ int save_vga(struct vgastate *state) { struct regstate *saved; - saved = kmalloc(sizeof(struct regstate), GFP_KERNEL); + saved = kzalloc(sizeof(struct regstate), GFP_KERNEL); + if (saved == NULL) return 1; - memset (saved, 0, sizeof(struct regstate)); + state->vidstate = (void *)saved; if (state->flags & VGA_SAVE_CMAP) { @@ -485,11 +485,6 @@ int restore_vga (struct vgastate *state) return 0; } -#ifdef MODULE -int init_module(void) { return 0; }; -void cleanup_module(void) {}; -#endif - EXPORT_SYMBOL(save_vga); EXPORT_SYMBOL(restore_vga);