vserver 1.9.3
[linux-2.6.git] / drivers / video / vga16fb.c
index 577355d..2e132fb 100644 (file)
@@ -1342,12 +1342,19 @@ int __init vga16fb_init(void)
 {
        int i;
        int ret;
+#ifndef MODULE
+       char *option = NULL;
 
+       if (fb_get_options("vga16fb", &option))
+               return -ENODEV;
+
+       vga16fb_setup(option);
+#endif
        printk(KERN_DEBUG "vga16fb: initializing\n");
 
        /* XXX share VGA_FB_PHYS and I/O region with vgacon and others */
 
-       vga16fb.screen_base = ioremap(VGA_MAP_MEM(VGA_FB_PHYS), VGA_FB_PHYS_LEN);
+       vga16fb.screen_base = (void *)VGA_MAP_MEM(VGA_FB_PHYS);
        if (!vga16fb.screen_base) {
                printk(KERN_ERR "vga16fb: unable to map device\n");
                ret = -ENOMEM;
@@ -1370,9 +1377,8 @@ int __init vga16fb_init(void)
        vga16fb.var = vga16fb_defined;
        vga16fb.fix = vga16fb_fix;
        vga16fb.par = &vga16_par;
-       vga16fb.flags = FBINFO_FLAG_DEFAULT;
-
-       vga16fb.fix.smem_start  = VGA_MAP_MEM(vga16fb.fix.smem_start);
+       vga16fb.flags = FBINFO_FLAG_DEFAULT |
+               FBINFO_HWACCEL_YPAN;
 
        i = (vga16fb_defined.bits_per_pixel == 8) ? 256 : 16;
        ret = fb_alloc_cmap(&vga16fb.cmap, i, 0);
@@ -1419,8 +1425,8 @@ static void __exit vga16fb_exit(void)
 
 #ifdef MODULE
 MODULE_LICENSE("GPL");
-module_init(vga16fb_init);
 #endif
+module_init(vga16fb_init);
 module_exit(vga16fb_exit);