aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/accessibility
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-07-31 16:53:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-31 17:41:03 -0400
commitbbeddf52adc1b4207674ab88686cbbe58c24f721 (patch)
treeb5cc2fe8f140e340407e2daa8b1ab2ba63ae00f4 /drivers/accessibility
parentd197c43d04decb6b1298fa3ef26ea04a9ca7c977 (diff)
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,
359 char *console_options, char *braille_options) 359 char *console_options, char *braille_options)
360{ 360{
361 int ret; 361 int ret;
362
363 if (!(console->flags & CON_BRL))
364 return 0;
362 if (!console_options) 365 if (!console_options)
363 /* Only support VisioBraille for now */ 366 /* Only support VisioBraille for now */
364 console_options = "57600o8"; 367 console_options = "57600o8";
@@ -374,15 +377,17 @@ int braille_register_console(struct console *console, int index,
374 braille_co = console; 377 braille_co = console;
375 register_keyboard_notifier(&keyboard_notifier_block); 378 register_keyboard_notifier(&keyboard_notifier_block);
376 register_vt_notifier(&vt_notifier_block); 379 register_vt_notifier(&vt_notifier_block);
377 return 0; 380 return 1;
378} 381}
379 382
380int braille_unregister_console(struct console *console) 383int braille_unregister_console(struct console *console)
381{ 384{
382 if (braille_co != console) 385 if (braille_co != console)
383 return -EINVAL; 386 return -EINVAL;
387 if (!(console->flags & CON_BRL))
388 return 0;
384 unregister_keyboard_notifier(&keyboard_notifier_block); 389 unregister_keyboard_notifier(&keyboard_notifier_block);
385 unregister_vt_notifier(&vt_notifier_block); 390 unregister_vt_notifier(&vt_notifier_block);
386 braille_co = NULL; 391 braille_co = NULL;
387 return 0; 392 return 1;
388} 393}