From: Florian Tobias Schandinat Date: Fri, 23 Jul 2010 11:32:25 +0000 (+0000) Subject: viafb: fix accel_flags check_var bug X-Git-Tag: v2.6.36-rc1~486^2~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=af29a5b1781bf642a29b5e9bb6162dccfcd626df;p=karo-tx-linux.git viafb: fix accel_flags check_var bug viafb: fix accel_flags check_var bug In check_var we should check and modify the var given and not the one which is currently active. So this code was obviously wrong. Probably this was doing no harm because all acceleration functions also check whether acceleration is possible. (otherwise I would expect this to lead to a null pointer dereference) Signed-off-by: Florian Tobias Schandinat Cc: Joseph Chan --- diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index 0f56eb28227d..bdd0e4130f4e 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c @@ -216,9 +216,9 @@ static int viafb_check_var(struct fb_var_screeninfo *var, /* Adjust var according to our driver's own table */ viafb_fill_var_timing_info(var, viafb_refresh, vmode_entry); - if (info->var.accel_flags & FB_ACCELF_TEXT && + if (var->accel_flags & FB_ACCELF_TEXT && !ppar->shared->vdev->engine_mmio) - info->var.accel_flags = 0; + var->accel_flags = 0; return 0; }