aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-02-15Merge tag 'staging-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds4-6/+6
Pull staging drivers patches from Greg KH: "Here's the big staging driver tree update for 3.20-rc1. Lots of little things in here, adding up to lots of overall cleanups. The IIO driver updates are also in here as they cross the staging tree boundry a lot. I2O has moved into staging as well, as a plan to drop it from the tree eventually as that's a dead subsystem. All of this has been in linux-next with no reported issues for a while" * tag 'staging-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (740 commits) staging: lustre: lustre: libcfs: define symbols as static staging: rtl8712: Do coding style cleanup staging: lustre: make obd_updatemax_lock static staging: rtl8188eu: core: switch with redundant cases staging: rtl8188eu: odm: conditional setting with no effect staging: rtl8188eu: odm: condition with no effect staging: ft1000: fix braces warning staging: sm7xxfb: fix remaining CamelCase staging: sm7xxfb: fix CamelCase staging: rtl8723au: multiple condition with no effect - if identical to else staging: sm7xxfb: make smtc_scr_info static staging/lustre/mdc: Initialize req in mdc_enqueue for !it case staging/lustre/clio: Do not allow group locks with gid 0 staging/lustre/llite: don't add to page cache upon failure staging/lustre/llite: Add exception entry check after radix_tree staging/lustre/libcfs: protect kkuc_groups from write access staging/lustre/fld: refer to MDT0 for fld lookup in some cases staging/lustre/llite: Solve a race to access lli_has_smd in read case staging/lustre/ptlrpc: hold rq_lock when modify rq_flags staging/lustre/lnet: portal spreading rotor should be unsigned ...
2015-02-10Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds1-3/+4
Pull trivial tree changes from Jiri Kosina: "Patches from trivial.git that keep the world turning around. Mostly documentation and comment fixes, and a two corner-case code fixes from Alan Cox" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: kexec, Kconfig: spell "architecture" properly mm: fix cleancache debugfs directory path blackfin: mach-common: ints-priority: remove unused function doubletalk: probe failure causes OOPS ARM: cache-l2x0.c: Make it clear that cache-l2x0 handles L310 cache controller msdos_fs.h: fix 'fields' in comment scsi: aic7xxx: fix comment ARM: l2c: fix comment ibmraid: fix writeable attribute with no store method dynamic_debug: fix comment doc: usbmon: fix spelling s/unpriviledged/unprivileged/ x86: init_mem_mapping(): use capital BIOS in comment
2015-02-07staging: speakup: Remove unnecessary spaceBastian Plettner1-1/+1
This patch fixes the checkpath.pl warning: ERROR: space prohibited before that ',' (ctx:WxE) + MSG_FIRST_INDEX , And removes the unnecessary space. Signed-off-by: Bastian Plettner <b.plettner@archlinux.info> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28drivers/staging: use current->state helpersDavidlohr Bueso1-1/+1
Call __set_current_state() instead of assigning the new state directly. These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments, keeping track of who changed the state. Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-20doubletalk: probe failure causes OOPSAlan Cox1-3/+4
The code bothers to probe for the device, but on failing to find it proceeds to try and release a NULL resource, thereby ruining it's prior good behaviour Resolves-Bug: https://bugzilla.kernel.org/show_bug.cgi?id=88581 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2015-01-17staging: speakup: Combine the consecutive stringPanir.Nyan1-1/+1
Combine the consecutive string Signed-off-by: Panir Nyan <Panir.Nyan@gmail.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: speakup: Split the comment to fit the lengthPanir.Nyan1-3/+3
Split the comment to fit the length. Signed-off-by: Panir Nyan <Panir.Nyan@gmail.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: speakup: Use time_after_eq to compare jiffies in speakup_keypc.cEsra Altintas1-1/+1
The following patch fixes the checkpatch.pl warning: WARNING: Comparing jiffies is almost always wrong; prefer time_after, time_before and friends Signed-off-by: Esra Altintas <es.altintas@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: speakup: remove jiffies comparison using time_after_eq() in speakup_dtlk.cEsra Altintas1-1/+1
The following patch fixes the checkpatch.pl warning: WARNING: Comparing jiffies is almost always wrong; prefer time_after, time_before and friends Signed-off-by: Esra Altintas <es.altintas@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: speakup: Change char * array type as static constDilek Uzulmez1-1/+1
This patch fixes "char * array declaration might be better as static const" checkpatch.pl warning in main.c Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: speakup: Change char * array type as static constEbru Akagunduz1-1/+1
This patch fixes "char * array declaration might be better as static const" checkpatch.pl warning in kobjects.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: speakup: Fixed else after return or break warningYeliz Taneroglu1-2/+2
The following patch fixes the checkpatch.pl warning: drivers/staging/speakup/kobjects.c:812 warning: else is not generally useful after a break or return Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: speakup: Fixed warning <linux/serial.h> instead of <asm/serial.h>Melike Yurtoglu1-1/+1
This patch fixes warning: 'use <linux/serial.h> instead <asm/serial.h>' found by checkpatch Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: speakup: Fix missing blank line warningMelike Yurtoglu1-0/+1
Fixes "Missing a blank line after declarations" checkpatch.pl warning in varhandlers.c Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28staging: speakup: Added blank line.Aybuke Ozdemir1-0/+1
This patch fixes "Missing a blank line after declarations" checkpatch.pl warning in selection.c Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28Staging: speakup: Fix trailing spaceAybuke Ozdemir1-18/+18
This patch fixes checkpatch.pl error in file spkguide.txt ERROR: trailing whitespace Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23staging: speakup: remove jiffies comparison using time_after_eq()Tapasweni Pathak3-3/+3
This patch fixes checkpatch.pl warning in files of speakup WARNING : Comparing jiffies is almost always wrong; prefer time_after, time_before and friends Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19staging: speakup: fix checkpatch warningRoxana Blaj1-2/+4
This fixes the checkpatch warning: WARNING: line over 80 characters Signed-off-by: Roxana Blaj <roxanagabriela10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19staging: speakup: fix checkpatch warningRoxana Blaj1-0/+1
This fixes the cheackpatch warning: WARNING: Missing a blank line after declarations Signed-off-by: Roxana Blaj <roxanagabriela10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19Staging: speakup: fix checkpatch warningNicoleta Birsan1-0/+1
This fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Nicoleta Birsan <nicolle.birsan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11staging: speakup: fix missing blank lines after declarationsDomagoj Trsan16-1/+87
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11staging: speakup: fix line indentationsDomagoj Trsan2-3/+4
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11staging: speakup: fix redundant return in void functionsDomagoj Trsan3-3/+0
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11staging: speakup: fix warnings: line over 80 charactersDomagoj Trsan2-12/+19
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-18Update speakup mailing list addressSamuel Thibault1-1/+1
The speakup mailing list only works on the linux-speakup.org domain now. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: speakup: speakup_dectlk.c - use time_before_eq()Anil Belur1-1/+1
- this replaces jiffies comparision with safer function using time_after_eq() Signed-off-by: Anil Belur <askb23@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19drivers/staging/speakup/main: fixed jiffie comparisonRobin Schroer1-1/+1
speakup_key() used manual comparison of jiffies to determine the time since the last keypress, replaced it with time_after() Signed-off-by: Robin Schroer <sulamiification@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-08Merge branch 'next' (accumulated 3.16 merge window patches) into masterLinus Torvalds17-151/+154
Now that 3.15 is released, this merges the 'next' branch into 'master', bringing us to the normal situation where my 'master' branch is the merge window. * accumulated work in next: (6809 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
2014-05-27Staging: speakup: don't die if accessing sysfs without synthSasha Levin1-0/+3
Setting a 'silent' parameter without a synth would crash the kernel. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24Staging: speakup: Update __speakup_paste_selection() tty (ab)usage to match vtBen Hutchings1-3/+11
This function is largely a duplicate of paste_selection() in drivers/tty/vt/selection.c, but with its own selection state. The speakup selection mechanism should really be merged with vt. For now, apply the changes from 'TTY: vt, fix paste_selection ldisc handling', 'tty: Make ldisc input flow control concurrency-friendly', and 'tty: Fix unsafe vt paste_selection()'. 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> Cc: <stable@vger.kernel.org> # v3.8 but needs backporting for < 3.12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24Staging: speakup: Move pasting into a work itemBen Hutchings3-6/+34
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> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24speakup: fix incorrect perms on speakup_acntsa.cRusty Russell1-4/+4
22c9bcad859d5c969289b3b37084a96c621f8f2c contained a bad substitution for ROOT_W => S_IRUSR|S_IRUGO instead of S_IWUSR|S_IRUGO. Fixes: 22c9bcad859d5c969289b3b37084a96c621f8f2c Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23drivers/staging/speakup/: avoid world-writable sysfs files.Rusty Russell16-150/+150
In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Christopher Brannon <chris@the-brannons.com> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-22Merge 3.15-rc2 into staging-nextGreg Kroah-Hartman1-9/+9
This resolves a bunch of merge errors with other fixes that are already in Linus's tree. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18staging: speakup: fix typo in kobjects.cHayato Suzuki1-1/+1
Correct spelling typo in kobjects.c Signed-off-by: Hayato Suzuki <hytszk@gmail.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-16staging: speakup: fix misuse of kstrtol() in handle_goto()Daeseok Youn1-9/+9
A string of goto_buf has a number followed by x or y. e.g. "3x" means move 3 lines down. The kstrtol() returns an error(-EINVAL) with this string so go_pos has unsigned a value of that error. And also "*cp" has not expected value. And fix sparse warnings: drivers/staging/speakup/main.c:1901 handle_goto() warn: unsigned '(speakup_console[vc->vc_num]->go_pos)' is never less than zero. drivers/staging/speakup/main.c:1911 handle_goto() warn: unsigned '(speakup_console[vc->vc_num]->go_pos)' is never less than zero. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-06Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linuxLinus Torvalds17-212/+210
Pull module updates from Rusty Russell: "Nothing major: the stricter permissions checking for sysfs broke a staging driver; fix included. Greg KH said he'd take the patch but hadn't as the merge window opened, so it's included here to avoid breaking build" * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: staging: fix up speakup kobject mode Use 'E' instead of 'X' for unsigned module taint flag. VERIFY_OCTAL_PERMISSIONS: stricter checking for sysfs perms. kallsyms: fix percpu vars on x86-64 with relocation. kallsyms: generalize address range checking module: LLVMLinux: Remove unused function warning from __param_check macro Fix: module signature vs tracepoints: add new TAINT_UNSIGNED_MODULE module: remove MODULE_GENERIC_TABLE module: allow multiple calls to MODULE_DEVICE_TABLE() per module module: use pr_cont
2014-04-01staging: fix up speakup kobject modeRusty Russell17-212/+210
It uses the unnecessary S_IFREG bit which broke when my stricter-checking-for-mode patch went in. Since we're fixing it anyway, the extra level of indirection is confusing for readers (ROOT_W == rw-r--r-- for example). Also, many of these are other-writable. Is that really intended? I'll-queue-this-patch-up-in-a-bit-by: Greg KH <greg@kroah.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2014-03-18staging/speakup:speakup_dectlk.c Fix line over 80 characters.Aybuke Ozdemir1-2/+4
checkpatch.pl issues with line over 80 characters in speakup_dectlk.c Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18staging: speakup: Prefer pr_err instead of printk(KERN_ERR)Keerthimai Janarthanan1-2/+2
Prefer pr_err instead of printk(KERN_ERR) Signed-off-by: Keerthimai Janarthanan <keerthimaipb@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-11mm/staging: remove unnecessary inclusion of bootmem.hGrygorii Strashko1-2/+0
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-11-11drivers: staging: speakup: serialio: only use platform specific SERIAL_PORT_DFNS.Chen Gang2-26/+4
If SERIAL_PORT_DFNS isn't present by platform, it need be defined to "nothing", like the 8250 serial driver does it. All related macros also need be removed: IRQF_SHARED is defined in "linux/interrupt.h", others will be defined when related architecture has SERIAL_PORT_DFNS. Or it will cause issue (for arc, with allmodconfig): CC [M] drivers/staging/speakup/serialio.o drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant SERIAL_PORT_DFNS ^ drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[0].baud_base') drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[1].baud_base') drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[2].baud_base') drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[3].baud_base') Signed-off-by: Chen Gang <gang.chen@asianux.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19Staging: speakup: replacing simple_strtoul with kstrtoulAshvini Varatharaj1-3/+5
Fix checkpatch warning: WARNING: simple_strtoul is obsolete, use kstrtoul instead Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19Staging: speakup: removing jiffies comparison in speakup_apollo.cAshvini Varatharaj1-1/+1
Fix checkpatch warning: WARNING: Comparing jiffies is almost always wrong; prefer time_after, time_before and friends Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19Staging: speakup: removing jiffies comparison using time_after_eq()Ashvini Varatharaj1-1/+1
Fix checkpatch warning: Comparing jiffies is almost always wrong; prefer time_after, time_before and friends Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14staging: speakup: remove unnecessary space before semicolonNandini Hanumanthagowda1-3/+3
Removed unnecessary space before semicolon which was leading to checkpatch.pl warning. Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03staging: speakup: str initialization replaced with NULL where it was initialized with intShalin Mehta3-3/+3
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-09-17staging: speakup: kobjects.c: Use correct values when changing voice.Christopher Brannon1-1/+4
When a new voice is selected, we set volume and pitch appropriate for the voice. We need to use the numeric index corresponding to the voice when indexing into the volume and pitch tables, rather than the raw user input that was used to select the voice. Note that using the raw input can also lead to an invalid memory read in the case of invalid or malicious user input. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging/speakup/kobjects.c: Code improvement.Raphael S.Carvalho1-31/+38
Well, there is no need to use strcmp since we can make a test of similar semantic by using the var_id field of param. I moved the test into the VAR_NUM:VAR_TIME case since VAR_STRING will never be "voice". spk_xlate isn't used anymore (in line 628), then there is no difference between using cp and buf in VAR_STRING case. Besides, buf is a const char and those changes remove one uneeded line. I created the function spk_reset_default_value because it clarifies the code and allows code reusing. Signed-off-by: Raphael S.Carvalho <raphael.scarv@gmail.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17Staging: speakup: Add dependencies for ISA card driversBen Hutchings1-0/+4
Several speakup drivers are for ISA cards and are useless on systems without ISA slots. Make them depend on ISA || COMPILE_TEST. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>