diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-08-31 00:42:49 +0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-08-31 00:42:49 +0400 |
commit | b8297cec2da30d3a5869597dbd7c8280d46a7dba (patch) | |
tree | f9d59dec3cf856754e26a5a719630669366cb779 /drivers/accessibility/braille/braille_console.c | |
parent | 2f74f972d4cc7d83408ea0c32d424edcb44887bf (diff) | |
parent | d4e4ab86bcba5a72779c43dc1459f71fea3d89c8 (diff) | |
download | linux-b8297cec2da30d3a5869597dbd7c8280d46a7dba.tar.xz |
Merge tag 'v3.11-rc5' into for-3.12 branch
For testing purposes I want some nfs and nfsd bugfixes (specifically,
58cd57bfd9db3bc213bf9d6a10920f82095f0114 and previous nfsd patches, and
Trond's 4f3cc4809a98a165a9708b72b47de71643797bbd).
Diffstat (limited to 'drivers/accessibility/braille/braille_console.c')
-rw-r--r-- | drivers/accessibility/braille/braille_console.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/accessibility/braille/braille_console.c b/drivers/accessibility/braille/braille_console.c index d21167bfc865..dc34a5b8bcee 100644 --- a/drivers/accessibility/braille/braille_console.c +++ b/drivers/accessibility/braille/braille_console.c @@ -359,6 +359,9 @@ int braille_register_console(struct console *console, int index, char *console_options, char *braille_options) { int ret; + + if (!(console->flags & CON_BRL)) + return 0; if (!console_options) /* Only support VisioBraille for now */ console_options = "57600o8"; @@ -374,15 +377,17 @@ int braille_register_console(struct console *console, int index, braille_co = console; register_keyboard_notifier(&keyboard_notifier_block); register_vt_notifier(&vt_notifier_block); - return 0; + return 1; } int braille_unregister_console(struct console *console) { if (braille_co != console) return -EINVAL; + if (!(console->flags & CON_BRL)) + return 0; unregister_keyboard_notifier(&keyboard_notifier_block); unregister_vt_notifier(&vt_notifier_block); braille_co = NULL; - return 0; + return 1; } |