]> err.no Git - linux-2.6/blobdiff - drivers/video/fbmem.c
Merge master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6] / drivers / video / fbmem.c
index 40784a944d05ea824470e09e4a7f918ff1a6032b..d2e19f6dd72c21e57a2eeea7c97fd3ced88d52b8 100644 (file)
@@ -80,10 +80,12 @@ 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;
+       int i, j;
 
        for (i = height; i--; ) {
-               memcpy(dst, src, s_pitch);
+               /* 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;
        }