diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-03-15 21:34:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-28 07:30:36 -0700 |
commit | 779bee40b907de23771bb8eaf334b81be53018b1 (patch) | |
tree | c26ab68a60aae8f2344625ca16732310161654c6 /drivers/staging/speakup | |
parent | 6c5f37dfbbc9b2121b39be3a7a61b93dbba3ed08 (diff) |
Staging: speakup: Clear hi font bit from attributes
Previously, speakup would see the hi-font bit in attributes.
Since this bit has nothing to do with attributes, we need to clear it.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup')
-rw-r--r-- | drivers/staging/speakup/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index a22fb07512a1..97ca4ecca8a9 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -263,7 +263,7 @@ static struct notifier_block vt_notifier_block = { static unsigned char get_attributes(struct vc_data *vc, u16 *pos) { pos = screen_pos(vc, pos - (u16 *)vc->vc_origin, 1); - return (u_char) (scr_readw(pos) >> 8); + return (scr_readw(pos) & ~vc->vc_hi_font_mask) >> 8; } static void speakup_date(struct vc_data *vc) @@ -473,8 +473,10 @@ static u16 get_char(struct vc_data *vc, u16 *pos, u_char *attribs) w = scr_readw(pos); c = w & 0xff; - if (w & vc->vc_hi_font_mask) + if (w & vc->vc_hi_font_mask) { + w &= ~vc->vc_hi_font_mask; c |= 0x100; + } ch = inverse_translate(vc, c, 0); *attribs = (w & 0xff00) >> 8; |