diff options
author | Jiri Slaby <jslaby@suse.cz> | 2022-06-07 12:49:17 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-10 13:37:01 +0200 |
commit | d9ebb906a45adc71a62aceb1e3608c847cafa660 (patch) | |
tree | 41f76be0377635087f5a42d3bc568743ee163d7f /drivers/accessibility | |
parent | tty/vt: consolemap: convert macros to static inlines (diff) | |
download | linux-d9ebb906a45adc71a62aceb1e3608c847cafa660.tar.xz linux-d9ebb906a45adc71a62aceb1e3608c847cafa660.zip |
tty/vt: consolemap: make parameters of inverse_translate() saner
- int use_unicode -> bool: it's used as bool at some places already, so
make it explicit.
- int glyph -> u16: every caller passes a u16 in. So make it explicit
too. And remove a negative check from inverse_translate() as it never
could be negative.
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20220607104946.18710-7-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/accessibility')
-rw-r--r-- | drivers/accessibility/braille/braille_console.c | 2 | ||||
-rw-r--r-- | drivers/accessibility/speakup/main.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/accessibility/braille/braille_console.c b/drivers/accessibility/braille/braille_console.c index fdc6b593f500..c4d54a5326b1 100644 --- a/drivers/accessibility/braille/braille_console.c +++ b/drivers/accessibility/braille/braille_console.c @@ -131,7 +131,7 @@ static void vc_refresh(struct vc_data *vc) for (i = 0; i < WIDTH; i++) { u16 glyph = screen_glyph(vc, 2 * (vc_x + i) + vc_y * vc->vc_size_row); - buf[i] = inverse_translate(vc, glyph, 1); + buf[i] = inverse_translate(vc, glyph, true); } braille_write(buf); } diff --git a/drivers/accessibility/speakup/main.c b/drivers/accessibility/speakup/main.c index d726537fa16c..f52265293482 100644 --- a/drivers/accessibility/speakup/main.c +++ b/drivers/accessibility/speakup/main.c @@ -470,7 +470,7 @@ static u16 get_char(struct vc_data *vc, u16 *pos, u_char *attribs) c |= 0x100; } - ch = inverse_translate(vc, c, 1); + ch = inverse_translate(vc, c, true); *attribs = (w & 0xff00) >> 8; } return ch; |