summaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/kobjects.c
Commit message (Collapse)AuthorAgeFilesLines
* Staging: speakup: Remove unused variableHaneen Mohammed2015-03-091-3/+1
| | | | | | | | | | | | | | | | | | | This patch removes variable that was used to store only the return value of a function call. The issue was detected and resolved using the following coccinelle script: @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: Combine the consecutive stringPanir.Nyan2015-01-171-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>
* staging: speakup: Change char * array type as static constEbru Akagunduz2014-10-201-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>
* staging: speakup: Fixed else after return or break warningYeliz Taneroglu2014-10-201-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>
* staging: speakup: fix checkpatch warningRoxana Blaj2014-09-191-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>
* staging: speakup: fix missing blank lines after declarationsDomagoj Trsan2014-09-111-0/+1
| | | | | Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/staging/speakup/: avoid world-writable sysfs files.Rusty Russell2014-05-231-31/+31
| | | | | | | | | | 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>
* staging: speakup: fix typo in kobjects.cHayato Suzuki2014-04-181-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>
* staging: fix up speakup kobject modeRusty Russell2014-04-011-31/+31
| | | | | | | | | | | | | 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>
* Staging: speakup: replacing simple_strtoul with kstrtoulAshvini Varatharaj2013-10-191-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>
* staging: speakup: kobjects.c: Use correct values when changing voice.Christopher Brannon2013-09-171-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>
* staging/speakup/kobjects.c: Code improvement.Raphael S.Carvalho2013-09-171-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>
* Staging: speakup/kobjects: Use NULL instead of 0Sachin Kamat2013-05-221-1/+1
| | | | | | | 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>
* staging: speakup: kobjects: remove custom locking macrosWilliam Hubbs2013-05-161-23/+23
| | | | | Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: remove custom string_unescape_any_inplaceAndy Shevchenko2013-04-301-2/+4
| | | | | | | | | | | | | There is generic implementation of the function to unescape strings. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: William Hubbs <w.d.hubbs@gmail.com> Cc: Chris Brannon <chris@the-brannons.com> Cc: Kirk Reiser <kirk@braille.uwo.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* staging: speakup: use native error codesAndy Shevchenko2013-03-291-3/+3
| | | | | | | | | | | | | | | The mapping as follows: E_RANGE -> ERANGE E_UNDEF -> ENODATA E_TOOLONG -> E2BIG SET_DEFAULT -> ERESTART As a side effect it fixes a bug in spk_var_store() where return code was mistakenly compared to negative value instead of positive. 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>
* staging: speakup: reuse native kernel functionsAndy Shevchenko2013-03-291-1/+1
| | | | | | | | | 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>
* Staging: speakup: kobjects.c: checkpatch.pl fixesLijo Antony2013-01-171-4/+4
| | | | | | | Fixed two "line over 80 characters" warnings reported by checkpatch.pl Signed-off-by: Lijo Antony <lijo.kernel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: Prefix externally-visible symbolsSamuel Thibault2013-01-071-40/+40
| | | | | | | 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>
* Staging: speakup: Use kmemdup rather than duplicating its implementationThomas Meyer2011-11-261-2/+1
| | | | | | | | | | Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> 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: fix failure handlingWilliam Hubbs2011-01-101-3/+6
| | | | | | | | 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: 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: 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: add speakup to the staging directoryWilliam Hubbs2010-10-071-0/+1007
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>
OpenPOWER on IntegriCloud