]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/video/macfb.c
V4L/DVB (4605): Fixes an issue with V4L1 and make headers-install
[mv-sheeva.git] / drivers / video / macfb.c
index cfc748e9427260037a075a0ad78ebdc8e90c4560..80a043807161fbae1f0e908b6a1f2d2ff56a8355 100644 (file)
@@ -24,7 +24,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/nubus.h>
@@ -609,18 +608,19 @@ void __init macfb_setup(char *options)
        }
 }
 
-void __init macfb_init(void)
+static int __init macfb_init(void)
 {
        int video_cmap_len, video_is_nubus = 0;
        struct nubus_dev* ndev = NULL;
        char *option = NULL;
+       int err;
 
        if (fb_get_options("macfb", &option))
                return -ENODEV;
        macfb_setup(option);
 
        if (!MACH_IS_MAC) 
-               return;
+               return -ENODEV;
 
        /* There can only be one internal video controller anyway so
           we're not too worried about this */
@@ -958,11 +958,11 @@ void __init macfb_init(void)
 
        fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0);
        
-       if (register_framebuffer(&fb_info) < 0)
-               return;
-
-       printk("fb%d: %s frame buffer device\n",
-              fb_info.node, fb_info.fix.id);
+       err = register_framebuffer(&fb_info);
+       if (!err)
+               printk("fb%d: %s frame buffer device\n",
+                      fb_info.node, fb_info.fix.id);
+       return err;
 }
 
 module_init(macfb_init);