mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Reviewed-by: Samuel Thibault <[email protected]> Cc: Ming Lei <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d197c43d04
commit
bbeddf52ad
5 changed files with 117 additions and 33 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue