aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/speakup/main.c
AgeCommit message (Collapse)Author
2014-06-18Staging: speakup: Move pasting into a work itemBen Hutchings
commit d7500135802ca55b3f4e01a16544e8b34082f8c3 upstream. Input is handled in softirq context, but when pasting we may need to sleep. speakup_paste_selection() currently tries to bodge this by busy-waiting if in_atomic(), but that doesn't help because the ldisc may also sleep. For bonus breakage, speakup_paste_selection() changes the state of current, even though it's not running in process context. Move it into a work item and make sure to cancel it on exit. References: https://bugs.debian.org/735202 References: https://bugs.debian.org/744015 Reported-by: Paul Gevers <elbrus@debian.org> Reported-and-tested-by: Jarek Czekalski <jarekczek@poczta.onet.pl> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-11mm/staging: remove unnecessary inclusion of bootmem.hGrygorii Strashko
Clean-up to remove depedency with bootmem headers. Cc: Yinghai Lu <yinghai@kernel.org> Cc: Tejun Heo <tj@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: William Hubbs <w.d.hubbs@gmail.com> Cc: Chris Brannon <chris@the-brannons.com> Cc: Kirk Reiser <kirk@reisers.ca> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03staging: speakup: str initialization replaced with NULL where it was ↵Shalin Mehta
initialized with int Fixed warnings in all of three files where the string was initilized with an integer instead of NULL Signed-off-by: Shalin Mehta <shalinmehta85@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22Staging: speakup/main: Staticize local symbolsSachin Kamat
Symbols referenced only in this file are made static. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22Staging: speakup/main: Use NULL instead of 0Sachin Kamat
Use NULL instead of 0 for pointers. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21staging/speakup: Changed parameters in kstrtol()Lisa Nguyen
Changed parameters in the kstrtol() function inside main.c to resolve warnings re: mismatched data types used. Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-17staging/speakup: Replaced deprecated functionLisa Nguyen
Replaced simple_strtol() function with kstrtol() function in main.c Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-17staging/speakup: Reformatted pointer variablesLisa Nguyen
Reformatted pointer variables in main.c to meet kernel coding standards. Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: speakup: main: remove custom locking macrosWilliam Hubbs
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-29staging: speakup: reuse native kernel functionsAndy Shevchenko
We have simple_strtoul and simple_strtol. Don't repeat their functionality here. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging: speakup: Turn some symbols staticSamuel Thibault
Turn static some symbols which do not actually need to be externally-visible Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging: speakup: Prefix externally-visible symbolsSamuel Thibault
This prefixes all externally-visible symbols of speakup with "spk_". Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18Staging: speakup: fix an improperly-declared variable.Christopher Brannon
A local static variable was declared as a pointer to a string constant. We're assigning to the underlying memory, so it needs to be an array instead. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08vt:tackle kbd_tableAlan Cox
Keyboard struct lifetime is easy, but the locking is not and is completely ignored by the existing code. Tackle this one head on - Make the kbd_table private so we can run down all direct users - Hoick the relevant ioctl handlers into the keyboard layer - Lock them with the keyboard lock so they don't change mid keypress - Add helpers for things like console stop/start so we isolate the poking around properly - Tweak the braille console so it still builds There are a couple of FIXME locking cases left for ioctls that are so hideous they should be addressed in a later patch. After this patch the kbd_table is private and all the keyboard jiggery pokery is in one place. This update fixes speakup and also a memory leak in the original. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-11-26Staging: speakup: Don't try to access an unallocated struct.Christopher Brannon
In speakup_init, we have the following: if (quiet_boot) spk_shut_up |= 0x01; And in spk_types.h: This patch moves the statement in speakup_init so that speakup_console[vc->vc_num] is guaranteed to be allocated when it executes. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05Remove unneeded version.h includes from drivers/staging/speakup/Jesper Juhl
It was pointed out by 'make versioncheck' that some includes of linux/version.h are not needed in drivers/staging/speakup/. This patch removes them. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14staging: speakup: Remove NULL check before kfreeIlia Mirkin
This patch was generated by the following semantic patch: // <smpl> @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // </smpl> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-20staging: speakup: more fixes for init-failure handling.Christopher Brannon
We still leaked many resources when Speakup failed to initialize. Examples of leaked resources include: /dev/synth, keyboard or VT notifiers, and heap-allocated st_spk_t structs. This is fixed. * We now use PTR_ERR to detect kthread_create failure (thank you Dan Carpenter). * The loop which frees members of the speakup_console array now iterates over the whole array, not stopping at the first NULL value. Fixes a possible memory leak. Safe because kfree(NULL) is a no-op. * The order of some initializations was changed. The safe ones, which will never fail, are performed first. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Acked-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-10staging: speakup: fix failure handlingWilliam Hubbs
fix the failure handling in kobjects and the main function so that we release the virtual keyboard if we exit due to another failure. Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19staging: speakup: fix memory leakVasiliy Kulikov
speakup_init() didn't free first_console if speakup_kobj_init() fails. Also propagate speakup_kobj_init()'s return code. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19staging: speakup: main.c style fixesWilliam Hubbs
- fix issues reported by checkpatch.pl - run code through Lindent - move some prototypes to speakup.h Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-07Staging: speakup: fix speakup core to build properlyGreg Kroah-Hartman
The vc_data structure changed to move the tty structure off to the port, so change the code to handle this. Now the code will build properly, and hopefully work as well. Cc: William Hubbs <w.d.hubbs@gmail.com> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-07Staging: add speakup to the staging directoryWilliam Hubbs
Speakup is a kernel based screen review package for the linux operating system. It allows blind users to interact with applications on the linux console by means of synthetic speech. The authors and maintainers of this code include the following: Kirk Reiser, Andy Berdan, John Covici, Brian and David Borowski, Christopher Brannon, Samuel Thibault and William Hubbs. Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>