Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965901AbcCOUfJ (ORCPT ); Tue, 15 Mar 2016 16:35:09 -0400 Received: from sonata.ens-lyon.org ([140.77.166.138]:42761 "EHLO sonata.ens-lyon.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965829AbcCOUfF (ORCPT ); Tue, 15 Mar 2016 16:35:05 -0400 Date: Tue, 15 Mar 2016 21:34:59 +0100 From: Samuel Thibault To: William Hubbs , Chris Brannon , Greg Kroah-Hartman , speakup@linux-speakup.org, linux-kernel@vger.kernel.org Subject: [PATCH] Staging: speakup: Clear hi font bit from attributes Message-ID: <20160315203459.GR3553@var.home> Mail-Followup-To: Samuel Thibault , William Hubbs , Chris Brannon , Greg Kroah-Hartman , speakup@linux-speakup.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 896 Lines: 28 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 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -267,7 +267,7 @@ static struct notifier_block vt_notifier 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) @@ -477,8 +477,10 @@ static u16 get_char(struct vc_data *vc, 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;