summaryrefslogtreecommitdiff
path: root/drivers/accessibility
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.com>2008-10-02 14:50:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-02 15:53:13 -0700
commitc0c9209ddd96bc4f1d70a8b9958710671e076080 (patch)
treecdfa805c8554e2591d85664cace73b4b48a26768 /drivers/accessibility
parent16dbc6c9616363fe53811abcbd935336dc0a0f01 (diff)
downloadlinux-3.10-c0c9209ddd96bc4f1d70a8b9958710671e076080.tar.gz
linux-3.10-c0c9209ddd96bc4f1d70a8b9958710671e076080.tar.bz2
linux-3.10-c0c9209ddd96bc4f1d70a8b9958710671e076080.zip
braille_console: only register notifiers when the braille console is 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>
Diffstat (limited to 'drivers/accessibility')
-rw-r--r--drivers/accessibility/braille/braille_console.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/accessibility/braille/braille_console.c b/drivers/accessibility/braille/braille_console.c
index 0a5f6b2114c..d672cfe7ca5 100644
--- a/drivers/accessibility/braille/braille_console.c
+++ b/drivers/accessibility/braille/braille_console.c
@@ -376,6 +376,8 @@ 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;
}
@@ -383,15 +385,8 @@ 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);