Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
[pandora-kernel.git] / drivers / video / vgastate.c
index ca92940..d94efaf 100644 (file)
@@ -13,7 +13,6 @@
  * archive for more details.  
  *
  */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/fb.h>
@@ -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);