summaryrefslogtreecommitdiff
path: root/drivers/staging/speakup/keyhelp.c
diff options
context:
space:
mode:
authorDomagoj Trsan <domagoj.trsan@gmail.com>2014-09-09 20:04:34 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-11 14:54:51 -0700
commit8e69a8110686572a4b88d006faa8c3c759c4c261 (patch)
tree38b28da55772c820099717b615509a77f0f0a158 /drivers/staging/speakup/keyhelp.c
parente48735236b8487f9e8f25fae8622645aaa640261 (diff)
staging: speakup: fix missing blank lines after declarations
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup/keyhelp.c')
-rw-r--r--drivers/staging/speakup/keyhelp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/speakup/keyhelp.c b/drivers/staging/speakup/keyhelp.c
index d9c664ffdf71..94756742136f 100644
--- a/drivers/staging/speakup/keyhelp.c
+++ b/drivers/staging/speakup/keyhelp.c
@@ -64,6 +64,7 @@ static void build_key_data(void)
u_char *kp, counters[MAXFUNCS], ch, ch1;
u_short *p_key = key_data, key;
int i, offset = 1;
+
nstates = (int)(state_tbl[-1]);
memset(counters, 0, sizeof(counters));
memset(key_offsets, 0, sizeof(key_offsets));
@@ -112,6 +113,7 @@ static void build_key_data(void)
static void say_key(int key)
{
int i, state = key >> 8;
+
key &= 0xff;
for (i = 0; i < 6; i++) {
if (state & masks[i])
@@ -131,6 +133,7 @@ static int help_init(void)
state_tbl = spk_our_keys[0]+SHIFT_TBL_SIZE+2;
for (i = 0; i < num_funcs; i++) {
char *cur_funcname = spk_msg_get(MSG_FUNCNAMES_START + i);
+
if (start == *cur_funcname)
continue;
start = *cur_funcname;
@@ -145,6 +148,7 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key)
char *name;
u_char func, *kp;
u_short *p_keys, val;
+
if (letter_offsets[0] == -1)
help_init();
if (type == KT_LATIN) {