summaryrefslogtreecommitdiffstats
path: root/drivers/accessibility
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-07-31 13:53:45 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-31 14:41:03 -0700
commitbbeddf52adc1b4207674ab88686cbbe58c24f721 (patch)
treeb5cc2fe8f140e340407e2daa8b1ab2ba63ae00f4 /drivers/accessibility
parentd197c43d04decb6b1298fa3ef26ea04a9ca7c977 (diff)
downloadlinux-bbeddf52adc1b4207674ab88686cbbe58c24f721.tar.gz
linux-bbeddf52adc1b4207674ab88686cbbe58c24f721.tar.bz2
linux-bbeddf52adc1b4207674ab88686cbbe58c24f721.zip
printk: move braille console support into separate braille.[ch] files
Create files with prototypes and static inlines for braille support. Make braille_console functions return 1 on success. Corrected CONFIG_A11Y_BRAILLE_CONSOLE=n _braille_console_setup return value to NULL. Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Cc: Ming Lei <ming.lei@canonical.com> 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.c9
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;
}