]> err.no Git - linux-2.6/commitdiff
embedded: fix vc_translate operator precedence
authorTim Bird <tim.bird@am.sony.com>
Fri, 1 Aug 2008 21:05:50 +0000 (14:05 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 1 Aug 2008 21:23:09 +0000 (22:23 +0100)
This fixes a bug in operator precedence in the newly introduced vc_translate
macro.  Without this fix, the translation of some characters on the
kernel console is garbled.

This patch was copied to the e-mail list previously for testing.  Now,
all reports confirm that it works, so this is an official post for
application.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
include/linux/vt_kern.h

index 14c0e91be9b5121f811a2375382d0096270b4486..8c8119ffee1204cf42dc6a4210fb15d435ddf7f0 100644 (file)
@@ -74,7 +74,7 @@ void con_protect_unimap(struct vc_data *vc, int rdonly);
 int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);
 
 #define vc_translate(vc, c) ((vc)->vc_translate[(c) |                  \
-                                       (vc)->vc_toggle_meta ? 0x80 : 0])
+                                       ((vc)->vc_toggle_meta ? 0x80 : 0)])
 #else
 #define con_set_trans_old(arg) (0)
 #define con_get_trans_old(arg) (-EINVAL)