Skip to content

Commit

Permalink
braille_console: only register notifiers when the braille console is …
Browse files Browse the repository at this point in the history
…used

Only register the braille driver VT and keyboard notifiers when the
braille console is used.  Avoids eating insert or backspace keys.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11242

Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
pterjan authored and torvalds committed Oct 2, 2008
1 parent 16dbc6c commit c0c9209
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions drivers/accessibility/braille/braille_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,22 +376,17 @@ int braille_register_console(struct console *console, int index,
console->flags |= CON_ENABLED;
console->index = index;
braille_co = console;
register_keyboard_notifier(&keyboard_notifier_block);
register_vt_notifier(&vt_notifier_block);
return 0;
}

int braille_unregister_console(struct console *console)
{
if (braille_co != console)
return -EINVAL;
unregister_keyboard_notifier(&keyboard_notifier_block);
unregister_vt_notifier(&vt_notifier_block);
braille_co = NULL;
return 0;
}

static int __init braille_init(void)
{
register_keyboard_notifier(&keyboard_notifier_block);
register_vt_notifier(&vt_notifier_block);
return 0;
}

console_initcall(braille_init);

0 comments on commit c0c9209

Please sign in to comment.