]> err.no Git - linux-2.6/blobdiff - drivers/video/fbmem.c
[PATCH] atyfb: Get initial mode timings from LCD BIOS
[linux-2.6] / drivers / video / fbmem.c
index 71b55070bdb97437d8e20625e06673f86a11e900..e2667ddab3f11033fd440cf10ed57365741ae35e 100644 (file)
@@ -90,15 +90,7 @@ EXPORT_SYMBOL(fb_get_color_depth);
  */
 void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, u32 height)
 {
-       int i, j;
-
-       for (i = height; i--; ) {
-               /* s_pitch is a few bytes at the most, memcpy is suboptimal */
-               for (j = 0; j < s_pitch; j++)
-                       dst[j] = src[j];
-               src += s_pitch;
-               dst += d_pitch;
-       }
+       __fb_pad_aligned_buffer(dst, d_pitch, src, s_pitch, height);
 }
 EXPORT_SYMBOL(fb_pad_aligned_buffer);
 
@@ -926,7 +918,7 @@ fb_mmap(struct file *file, struct vm_area_struct * vma)
        }
 #endif
 #elif defined(__powerpc__)
-       vma->vm_page_prot = phys_mem_access_prot(file, off,
+       vma->vm_page_prot = phys_mem_access_prot(file, off >> PAGE_SHIFT,
                                                 vma->vm_end - vma->vm_start,
                                                 vma->vm_page_prot);
 #elif defined(__alpha__)
@@ -1039,7 +1031,7 @@ register_framebuffer(struct fb_info *fb_info)
                        break;
        fb_info->node = i;
 
-       fb_info->class_device = class_device_create(fb_class, MKDEV(FB_MAJOR, i),
+       fb_info->class_device = class_device_create(fb_class, NULL, MKDEV(FB_MAJOR, i),
                                    fb_info->device, "fb%d", i);
        if (IS_ERR(fb_info->class_device)) {
                /* Not fatal */