aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup
Commit message (Collapse)AuthorAgeFilesLines
* more driver stuff from 3.2.72Wolfgang Wiedmeyer2015-10-236-19/+11
|
* staging: speakup: avoid out-of-range access in synth_add()Samuel Thibault2013-01-171-1/+1
| | | | | | | | | | | commit 6102c48bd421074a33e102f2ebda3724e8d275f9 upstream. Check that array index is in-bounds before accessing the synths[] array. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Cc: Nickolai Zeldovich <nickolai@csail.mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: avoid out-of-range access in synth_init()Nickolai Zeldovich2013-01-171-1/+1
| | | | | | | | | | | commit ae428655b826f2755a8101b27beda42a275ef8ad upstream. Check that array index is in-bounds before accessing the synths[] array. Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup_soft: Fix reading of init stringBen Hutchings2012-10-071-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | commit 40fe4f89671fb3c7ded94190fb267402a38b0261 upstream. softsynth_read() reads a character at a time from the init string; when it finds the null terminator it sets the initialized flag but then repeats the last character. Additionally, if the read() buffer is not big enough for the init string, the next read() will start reading from the beginning again. So the caller may never progress to reading anything else. Replace the simple initialized flag with the current position in the init string, carried over between calls. Switch to reading real data once this reaches the null terminator. (This assumes that the length of the init string can't change, which seems to be the case. Really, the string and position belong together in a per-file private struct.) Tested-by: Samuel Thibault <sthibault@debian.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: speakup: fix an improperly-declared variable.Christopher Brannon2012-10-021-1/+1
| | | | | | | | | | | | commit 4ea418b8b2fa8a70d0fcc8231b65e67b3a72984b upstream. 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>
* Fix common misspellingsLucas De Marchi2011-03-312-2/+2
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* staging: speakup: Remove NULL check before kfreeIlia Mirkin2011-03-141-4/+2
| | | | | | | | | | | | | | | | | 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>
* Staging: speakup: fix an out-of-bounds error.Christopher Brannon2011-02-231-1/+3
| | | | | | | | | | | The cur_item variable from keyhelp.c is an index into a table of messages. The following condition should always hold: MSG_FUNCNAMES_START + cur_item <= MSG_FUNCNAMES_END. The check in keyhelp.c was wrong. It allowed cur_item to be incremented to an out-of-bounds value. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: enlosed macros with complex values in parenthesisTimo von Holtz2011-02-042-31/+31
| | | | | | | Enclosed all macros with complex values in parenthesis Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: Merge branch 'staging-next' into 2.6.38-rc3Greg Kroah-Hartman2011-02-021-1/+1
|\ | | | | | | | | | | | | | | | | This was done to resolve conflicts in the following files due to patches in Linus's tree and in the staging-next tree: drivers/staging/brcm80211/brcmsmac/wl_mac80211.c drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: speakup: &&/|| confusion in silent_store()roel kluin2011-01-201-1/+1
| | | | | | | | | | | | | | | | | | Fix test: the branch is always taken. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | staging: speakup: more fixes for init-failure handling.Christopher Brannon2011-01-201-39/+88
|/ | | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch 'staging-next' of ↵Linus Torvalds2011-01-103-16/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (510 commits) staging: speakup: fix failure handling staging: usbip: remove double giveback of URB Staging: batman-adv: Remove batman-adv from staging Staging: hv: Use only one txf buffer per channel and kmalloc/GFP_KERNEL on initialize staging: hv: remove unneeded osd_schedule_callback staging: hv: convert channel_mgmt.c to not call osd_schedule_callback staging: hv: convert vmbus_on_msg_dpc to not call osd_schedule_callback staging: brcm80211: Fix WL_<type> logging macros Staging: IIO: DDS: AD9833 / AD9834 driver Staging: IIO: dds.h convenience macros Staging: IIO: Direct digital synthesis abi documentation staging: brcm80211: Convert ETHER_TYPE_802_1X to ETH_P_PAE staging: brcm80211: Remove unused ETHER_TYPE_<foo> #defines staging: brcm80211: Remove ETHER_HDR_LEN, use ETH_HLEN staging: brcm80211: Convert ETHER_ADDR_LEN to ETH_ALEN staging: brcm80211: Convert ETHER_IS<FOO> to is_<foo>_ether_addr staging: brcm80211: Remove unused ether_<foo> #defines and struct staging: brcm80211: Convert ETHER_IS_MULTI to is_multicast_ether_addr staging: brcm80211: Remove unused #defines ETHER_<foo>_LOCALADDR Staging: comedi: Fix checkpatch.pl issues in file s526.c ... Fix up trivial conflict in drivers/video/udlfb.c
| * staging: speakup: fix failure handlingWilliam Hubbs2011-01-102-15/+27
| | | | | | | | | | | | | | | | 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>
| * Staging: Merge 2.6.37-rc5 into staging-nextGreg Kroah-Hartman2010-12-072-2/+0
| |\ | | | | | | | | | | | | | | | | | | | | | | | | This was done to handle a number of conflicts in the batman-adv and winbond drivers properly. It also now allows us to fix up the sysfs attributes properly that were not in the .37 release due to them being only in this tree at the time. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | Staging: speakup: spk_types: trival coding style issueTracey Dent2010-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Checkpatch.pl gives WARNING: missing space after struct definition. This patch fixes that warning that was on line 55. Signed-off-by: Tracey Dent <tdent48227@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | fakekey: Simplify speakup_fake_key_pressed through this_cpu_opsChristoph Lameter2010-12-171-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The whole function can be expressed as a simple this_cpu_read() operation. The function overhead is now likely multiple times that of the single instruction that is executed in it. Sedat: fixed compile failure caused by an extra ')'. Cc: William Hubbs <w.d.hubbs@gmail.com> Cc: Sedat Dilek <sedat.dilek@gmail.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* | | drivers: Replace __get_cpu_var with __this_cpu_read if not used for an address.Christoph Lameter2010-12-171-2/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __get_cpu_var() can be replaced with this_cpu_read and will then use a single read instruction with implied address calculation to access the correct per cpu instance. However, the address of a per cpu variable passed to __this_cpu_read() cannot be determed (since its an implied address conversion through segment prefixes). Therefore apply this only to uses of __get_cpu_var where the addres of the variable is not used. V3->V4: - Move one instance of this_cpu_inc_return to a later patch so that this one can go in without percpu infrastructrure changes. Sedat: fixed compile failure caused by an extra ')'. Cc: Neil Horman <nhorman@tuxdriver.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Sedat Dilek <sedat.dilek@gmail.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* | Merge branch 'master' into workGreg Kroah-Hartman2010-11-291-1/+0
|\ \
| * | BKL: remove extraneous #include <smp_lock.h>Arnd Bergmann2010-11-171-1/+0
| |/ | | | | | | | | | | | | | | | | | | The big kernel lock has been removed from all these files at some point, leaving only the #include. Remove this too as a cleanup. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Staging: speakup: free after input_unregister_device()Dan Carpenter2010-11-161-1/+0
|/ | | | | | | | input_unregister_device() frees the device so the call to input_free_device() is a double free. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: fix memory leakVasiliy Kulikov2010-10-191-2/+5
| | | | | | | | 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>
* staging: speakup: fix leaks of sysfs groupsVasiliy Kulikov2010-10-191-4/+14
| | | | | | | | speakup_kobj_init() and speakup_kobj_exit() didn't remove i18n_attr_group and main_attr_group sysfs groups. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: varhandlers.c style fixesWilliam Hubbs2010-10-191-54/+55
| | | | | | | fix issues reported by checkpatch.pl Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: thread.c style fixesWilliam Hubbs2010-10-191-4/+4
| | | | | | | fix issues reported by checkpatch.pl Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: synth.c style fixesWilliam Hubbs2010-10-191-13/+18
| | | | | | | fix issues reported by checkpatch.pl Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: serialio.c style fixesWilliam Hubbs2010-10-191-3/+6
| | | | | | | fix issues reported by checkpatch.pl Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: selection.c style fixesWilliam Hubbs2010-10-191-10/+6
| | | | | | | fix issues reported by checkpatch.pl Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: main.c style fixesWilliam Hubbs2010-10-192-285/+291
| | | | | | | | | - 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>
* staging: speakup: i18n.c fix long linesWilliam Hubbs2010-10-191-3/+6
| | | | | | | A help message had to be slightly reworded, but the meaning is the same. Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_dectlk.c: style fixesChristopher Brannon2010-10-151-15/+22
| | | | | | | | | | * Clean this file based on reports from checkpatch.pl. * Replace a function-like macro with an inline function. * Remove an incorrect use of the volatile qualifier. The previously-volatile variable is now always protected by a spinlock. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_txprt.c: style fixesChristopher Brannon2010-10-151-7/+7
| | | | | | | * Clean this file based on reports from checkpatch.pl. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_spkout.c: style fixesChristopher Brannon2010-10-151-8/+8
| | | | | | | * Clean this file based on reports from checkpatch.pl. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_soft.c: style fixesChristopher Brannon2010-10-151-21/+34
| | | | | | | | | * Clean this file based on reports from checkpatch.pl. * Make the file_operations structure const. * Use strict_strtoul instead of simple_strtoul. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_ltlk.c: style fixesChristopher Brannon2010-10-151-11/+10
| | | | | | | | * Clean this file based on reports from checkpatch.pl. * Remove an unused function-like macro. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_keypc.c: style fixesChristopher Brannon2010-10-151-10/+18
| | | | | | | | | * Clean this file based on reports from checkpatch.pl. * Eliminate the unused synth_readable macro. * Convert function-like macros to inline functions. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_dummy.c: style fixesChristopher Brannon2010-10-151-7/+7
| | | | | | | * Clean this file based on reports from checkpatch.pl. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_dtlk.c: style fixesChristopher Brannon2010-10-151-20/+36
| | | | | | | | | * Clean this file based on reports from checkpatch.pl. * Replace function-like macros with inline functions. * Simplify some boolean expressions. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_decpc.c: style fixesChristopher Brannon2010-10-151-10/+11
| | | | | | | * Clean this file based on reports from checkpatch.pl. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_decext.c: style fixesChristopher Brannon2010-10-151-13/+24
| | | | | | | | | * Clean this file based on reports from checkpatch.pl. * Replace function-like macros with inline macros. * Eliminate a use of the ternary operator, for readability. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_bns.c: style fixesChristopher Brannon2010-10-151-7/+7
| | | | | | | * Clean this file based on reports from checkpatch.pl. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_audptr.c: style fixesChristopher Brannon2010-10-151-8/+8
| | | | | | | * Clean this file based on reports from checkpatch.pl. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_apollo.c: style fixesChristopher Brannon2010-10-151-10/+12
| | | | | | | * Clean this file based on reports from checkpatch.pl. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_acntsa.c: style fixesChristopher Brannon2010-10-151-8/+7
| | | | | | | | * Clean this file based on reports from checkpatch.pl. * Eliminate an unused function-like macro. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: speakup_acntpc.c: style fixesChristopher Brannon2010-10-151-12/+20
| | | | | | | | | * Clean this file based on reports from checkpatch.pl. * Eliminate the unused synth_readable macro. * Convert function-like macros to inline functions. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: fix printk format warningRandy Dunlap2010-10-141-1/+1
| | | | | | | | | | Fix printk format warning: drivers/staging/speakup/serialio.c:44: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'long unsigned int' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: <speakup@braille.uwo.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: kobjects.c: style fixesWilliam Hubbs2010-10-121-21/+26
| | | | | | | clean upd this file based on reports from checkpatch.pl Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: keyhelp.c: style fixesWilliam Hubbs2010-10-121-24/+26
| | | | | | | Clean up this file based on reports from checkpatch.pl. Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: i18n.c: style fixesWilliam Hubbs2010-10-121-8/+11
| | | | | | | Clean up this file based on reports from checkpatch.pl. Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: speakup: devsynth.c: style fixesWilliam Hubbs2010-10-121-2/+4
| | | | | | | clean up this file based on reports from checkpatch.pl. Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>