fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / video / hpfb.c
index bebdac5..9ab9b83 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/init.h>
@@ -296,6 +295,8 @@ static int __init hpfb_init_one(unsigned long phys_base, unsigned long virt_base
 
        if (register_framebuffer(&fb_info) < 0) {
                fb_dealloc_cmap(&fb_info.cmap);
+               iounmap(fb_info.screen_base);
+               fb_info.screen_base = NULL;
                return 1;
        }
 
@@ -386,7 +387,9 @@ int __init hpfb_init(void)
        if (fb_get_options("hpfb", NULL))
                return -ENODEV;
 
-       dio_module_init(&hpfb_driver);
+       err = dio_register_driver(&hpfb_driver);
+       if (err)
+               return err;
 
        fs = get_fs();
        set_fs(KERNEL_DS);