fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / video / atafb.c
index add2972..602db66 100644 (file)
@@ -53,7 +53,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>
@@ -1522,7 +1521,7 @@ static void falcon_set_par( struct atafb_par *par )
 }
 
 
-static irqreturn_t falcon_vbl_switcher( int irq, void *dummy, struct pt_regs *fp )
+static irqreturn_t falcon_vbl_switcher( int irq, void *dummy )
 {
        struct falcon_hw *hw = &f_new_mode;
 
@@ -2571,8 +2570,7 @@ atafb_pan_display(struct fb_var_screeninfo *var, int con, struct fb_info *info)
 }
 
 static int
-atafb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-              unsigned long arg, int con, struct fb_info *info)
+atafb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
 {
        switch (cmd) {
 #ifdef FBCMD_GET_CURRENTPAR
@@ -2806,8 +2804,19 @@ int __init atafb_init(void)
        atafb_set_disp(-1, &fb_info);
        do_install_cmap(0, &fb_info);
 
-       if (register_framebuffer(&fb_info) < 0)
+       if (register_framebuffer(&fb_info) < 0) {
+#ifdef ATAFB_EXT
+               if (external_addr) {
+                       iounmap(external_addr);
+                       external_addr = NULL;
+               }
+               if (external_vgaiobase) {
+                       iounmap((void*)external_vgaiobase);
+                       external_vgaiobase = 0;
+               }
+#endif
                return -EINVAL;
+       }
 
        printk("Determined %dx%d, depth %d\n",
               disp.var.xres, disp.var.yres, disp.var.bits_per_pixel);
@@ -2819,8 +2828,6 @@ int __init atafb_init(void)
               fb_info.node, fb_info.modename, screen_len>>10);
 
        /* TODO: This driver cannot be unloaded yet */
-       MOD_INC_USE_COUNT;
-
        return 0;
 }
 
@@ -3097,13 +3104,4 @@ int init_module(void)
 {
        return atafb_init();
 }
-
-void cleanup_module(void)
-{
-       /* Not reached because the usecount will never
-          be decremented to zero */
-       unregister_framebuffer(&fb_info);
-       /* atari_stram_free( screen_base ); */
-       /* TODO: further clean up ... */
-}
 #endif /* MODULE */