]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/atafb.c
device create: framebuffer: convert device_create to device_create_drvdata
[linux-2.6-omap-h63xx.git] / drivers / video / atafb.c
index 0038a0541c7eac5ec30e1ae4bf8ae0b61e8d83c4..fa55d356b5354202e8f6f8236c358593074e3077 100644 (file)
@@ -58,7 +58,7 @@
 #include <linux/interrupt.h>
 
 #include <asm/setup.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/irq.h>
 #include <asm/io.h>
@@ -1270,7 +1270,7 @@ again:
 
        gstart = (prescale / 2 + plen * left_margin) / prescale;
        /* gend1 is for hde (gend-gstart multiple of align), shifter's xres */
-       gend1 = gstart + ((xres + align - 1) / align) * align * plen / prescale;
+       gend1 = gstart + roundup(xres, align) * plen / prescale;
        /* gend2 is for hbb, visible xres (rest to gend1 is cut off by hblank) */
        gend2 = gstart + xres * plen / prescale;
        par->HHT = plen * (left_margin + xres + right_margin) /
@@ -3110,7 +3110,7 @@ int __init atafb_init(void)
        printk("atafb_init: start\n");
 
        if (!MACH_IS_ATARI)
-               return -ENXIO;
+               return -ENODEV;
 
        do {
 #ifdef ATAFB_EXT
@@ -3230,6 +3230,9 @@ int __init atafb_init(void)
                return -EINVAL;
        }
 
+       fb_videomode_to_modelist(atafb_modedb, NUM_TOTAL_MODES,
+                                &fb_info.modelist);
+
        atafb_set_disp(&fb_info);
 
        fb_alloc_cmap(&(fb_info.cmap), 1 << fb_info.var.bits_per_pixel, 0);