ARM HDLCD: Review comments from Liviu - extraneous memcpy
authorChris Redpath <chris.redpath@arm.com>
Fri, 29 Jun 2012 15:07:46 +0000 (16:07 +0100)
committerJon Medhurst <tixy@linaro.org>
Mon, 1 Jul 2013 10:04:25 +0000 (11:04 +0100)
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Reviewed-By: Liviu Dudau <liviu.dudau@arm.com>
drivers/video/arm-hdlcd.c

index 8d5409db6b17bf5feecae07bf79aaa8bef8e5ec4..f16bb882e0c5fd2604b89007a5de2a039adde85b 100644 (file)
@@ -262,10 +262,10 @@ static int hdlcd_set_par(struct fb_info *info)
        if (!memcmp(&info->var, &cached_var_screeninfo,
                                sizeof(struct fb_var_screeninfo))) {
                if(old_yoffset != info->var.yoffset) {
-                       /* we only changed yoffset */
+                       /* we only changed yoffset, and we already
+                        * already recorded it a couple lines up
+                        */
                        hdlcd_pan_display(&info->var, info);
-                       memcpy(&cached_var_screeninfo, &info->var,
-                               sizeof(struct fb_var_screeninfo));
                }
                /* or no change */
                return 0;