1
0
Fork 0
Commit Graph

401 Commits (redonkable)

Author SHA1 Message Date
Samuel Thibault 88867e3d0b Staging: speakup: fix read scrolled-back VT
Previously, speakup would always read the non-scrolled part of the VT,
even when the VT is scrolled back with shift-page.  This patch makes
vt.c export screen_pos so that speakup can use it to properly access
the content of the scrolled-back VT.

This was tested with both vgacon and fbcon.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:55:40 -08:00
Samuel Thibault 327b882d3b Staging: speakup: Fix getting port information
Commit f79b0d9c22 ("staging: speakup: Fixed warning <linux/serial.h>
instead of <asm/serial.h>") broke the port information in the speakup
driver: SERIAL_PORT_DFNS only gets defined if asm/serial.h is included,
and no other header includes asm/serial.h.

We here make sure serialio.c does get the arch-specific definition of
SERIAL_PORT_DFNS from asm/serial.h, if any.

Along the way, this makes sure that we do have information for the
requested serial port number (index)

Fixes: f79b0d9c22 ("staging: speakup: Fixed warning <linux/serial.h> instead of <asm/serial.h>")
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: stable <stable@vger.kernel.org> # 3.18
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:55:40 -08:00
Shraddha Barke 5cb10d42de Staging: speakup: Remove FSF mailing address
FSF mailing address is no longer required to be specified. Hence
removed.
Detected using checkpatch

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:40:31 -08:00
Jeff Becker 911b04d61d STAGING/SPEAKUP: Fix "expression using sizeof bool" warnings
Fix "warning: expression using sizeof bool" messages caught by sparse.
Resending directly to SPEAKUP maintainers.

Signed-off-by: Jeff Becker <Jeffrey.C.Becker@nasa.gov>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:40:31 -08:00
Saurabh Sengar d86b4a71ca Staging: speakup: varhandlers: cleanup of function spk_get_punc_var
This patch does the following:
* changed the complicated if statements to simple case statements
* in case of E_DEFAULT, no need to return error as ERESTART,
because this is the user asked for. Hence function should return success.
* ret variable is 0 always, hence removed it.
* removed one ternary operator, as it was always returning the status value only,
and hence removed the status variable too

Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:40:31 -08:00
Christian Colic d3da1cbaef staging: speakup: (coding style) Rewrite comparisons to NULL
Rewrite comparisons to NULL so they dont show any checkpatch errors anymore.
"vc_cons[i].d != NULL" => "vc_cons[i].d"

Signed-off-by: Christian Colic <colic.christian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:40:31 -08:00
Christian Colic 1fd16a3125 staging: speakup: (coding style) Add braces around all arms of if-statement
Fix checkpatch error: "braces {} should be used on all arms of this statement"
by adding the necessary braces around the "if".

Signed-off-by: Christian Colic <colic.christian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:40:31 -08:00
Christian Colic a4efe6fd5d staging: speakup: (coding style) Add spaces around operands (checkpatch checks)
Fix checkpatch check: CHECK: spaces preferred around that '-' (ctx:VxV)
Add spaces around operands to fix these warnings.

Signed-off-by: Christian Colic <colic.christian@gmail.com>
Reviewed-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:40:31 -08:00
Peter Hurley f4f9edcf9b staging/speakup: Use tty_ldisc_ref() for paste kworker
As the function documentation for tty_ldisc_ref_wait() notes, it is
only callable from a tty file_operations routine; otherwise there
is no guarantee the ref won't be NULL.

The key difference with the VT's paste_selection() is that is an ioctl,
where __speakup_paste_selection() is completely async kworker, kicked
off from interrupt context.

Fixes: 28a821c306 ("Staging: speakup: Update __speakup_paste_selection()
       tty (ab)usage to match vt")
Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-26 23:17:54 -08:00
Linus Torvalds 118c216e16 Staging driver update for 4.4-rc1
Here's the big staging driver update for 4.4-rc1.  If you were
 disappointed for 4.3-rc1 that we didn't contribute enough changesets,
 you should be happy with this pull request of over 2400 patches.
 
 But overall we removed more lines of code than we added, which is nice
 to see.  Full details in the shortlog.
 
 All of these have been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlY6exwACgkQMUfUDdst+ymXiQCeNhbUB5Gv5FZtPevt25reX6wU
 IoUAn3+wAsQnwkXhOwaR+15UVJe7/7ua
 =s9E4
 -----END PGP SIGNATURE-----

Merge tag 'staging-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here's the big staging driver update for 4.4-rc1.  If you were
  disappointed for 4.3-rc1 that we didn't contribute enough changesets,
  you should be happy with this pull request of over 2400 patches.

  But overall we removed more lines of code than we added, which is nice
  to see.  Full details in the shortlog.

  All of these have been in linux-next for a while"

Greg, I've never been disappointed in how few commits Staging
contributes to the kernel..  Never.

* tag 'staging-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (2431 commits)
  Staging: rtl8192u: ieee80211: added missing blank lines
  Staging: rtl8192u: ieee80211: removed unnecessary braces
  Staging: rtl8192u: ieee80211: corrected block comments
  Staging: rtl8192u: ieee80211: corrected indent
  Staging: rtl8192u: ieee80211: added missing spaces after if
  Staging: rtl8192u: ieee80211: added missing space around '='
  Staging: rtl8192u: ieee80211: fixed position of else statements
  Staging: rtl8192u: ieee80211: fixed open brace positions
  staging: rdma: ipath: Remove unneeded vairable.
  staging: rtl8188eu: pwrGrpCnt variable removed in store_pwrindex_offset function
  staging: rtl8188eu: new variable for hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCnt] in store_pwrindex_offset function
  staging: rtl8188eu: checkpatch fixes: 'Avoid CamelCase' in hal/bb_cfg.c
  staging: rtl8188eu: checkpatch fixes: line over 80 characters splited into two parts
  staging: rtl8188eu: checkpatch fixes: alignment should match open parenthesis
  staging: rtl8188eu: checkpatch fixes: unnecessary parentheses removed in hal/bb_cfg.c
  staging: rtl8188eu: checkpatch fixes: spaces preferred around that '|' in hal/bb_cfg.c
  staging: rtl8188eu: operator = replaced by += in loop increment
  staging: rtl8188eu: occurrence of the 5 GHz code marked
  staging: rtl8188eu: increment placed into for loop header
  staging: rtl8188eu: while loop replaced by for loop in rtw_restruct_wmm_ie
  ...
2015-11-04 21:40:53 -08:00
Burcin Akalin a16d77fc05 staging: speakup: Remove multiple assignments
Remove multiple assignments by factorizing them.Problem found using
checkpatch.pl
CHECK: multiple assignments should be avoided

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:44:30 -07:00
Ingo Molnar a1a2ab2ff7 Linux 4.3-rc6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWJCaDAAoJEHm+PkMAQRiGvJQH/jGlxawu+mnNFjIRXmk8Zucq
 cxDVTPnQ4S1DJMyRSQTqe6ccDgDM/TEISJPZ0Gwc2SQLda27zdQiz05upbqHSPSH
 /FUHMKiMRhhIBOzdfEGR4Ry2YZID+DlG5EWCgRKf/GlgY3STZSpjIBPYd3Rl3zsU
 qragNjtbCE6eUpnLwkv40Q2mzzR3/fZxJ0drgE/QiSF8P0VmvVbrcQMF58vnUQgy
 9URp48mLhmKj+IrElSnvXMG0XLrKn1tRYXGXd3w+x1Nlr//SHYsIuQHUcp6SAVQh
 p2HXLL7eoy8rs45MCiOfXG7VgNWF6HFjVMtrNUcNfgBsLCx0qFMVrKIILrGtKh0=
 =ETze
 -----END PGP SIGNATURE-----

Merge tag 'v4.3-rc6' into locking/core, to pick up fixes before applying new changes

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-10-20 10:16:46 +02:00
Amitoj Kaur Chawla b62c535cd0 staging: speakup: varhandlers: Remove useless intialisation
Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:56:23 -07:00
Amitoj Kaur Chawla b5186a9fd2 staging: speakup: speakup_audptr: Remove useless intialisation
Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:56:23 -07:00
Cristina Moraru 7ea8778ef3 staging: speakup: Fix multi-line comment style
Thus using the preferred style for multi-line coments as
mentioned in Documentation/CodingStyle.

It also silences 'Block comments use * on subsequent lines'
and 'Block comments use a trailing */ on a separate line'
checkpatch.pl warnings.

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:56:23 -07:00
Greg Kroah-Hartman 9b22abe7b3 Merge 4.3-rc5 into staging-next
We want the fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 10:46:53 -07:00
Shraddha Barke f60c265159 Staging: speakup: Use ARRAY_SIZE macro
ARRAY_SIZE is more concise to use when the size of an array is divided
by the size of its type or the size of its first element.

Changes made using Coccinelle-

@@
type T;
T[] E;
@@

- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:50:27 +01:00
covici@ccs.covici.com b1d562acc7 staging: speakup: fix speakup-r regression
Here is a patch to make speakup-r work again.

It broke in 3.6 due to commit 4369c64c79
"Input: Send events one packet at a time)

The problem was that the fakekey.c routine to fake a down arrow no
longer functioned properly and putting the input_sync fixed it.

Fixes: 4369c64c79
Cc: stable <stable@vger.kernel.org>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: John Covici <covici@ccs.covici.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 19:57:20 +01:00
Boqun Feng 8456799561 locking/atomics, cmpxchg: Privatize the inclusion of asm/cmpxchg.h
After commit:

  654672d4ba ("locking/atomics: Add _{acquire|release|relaxed}() variants of some atomic operations")

Architectures may only provide {cmp,}xchg_relaxed definitions in
asm/cmpxchg.h. Other variants, such as {cmp,}xchg, may be built in
linux/atomic.h, which means simply including asm/cmpxchg.h may not get
the definitions of all the{cmp,}xchg variants.

Therefore, we should privatize the inclusions of asm/cmpxchg.h to
keep it only included in arch/* and replace the inclusions outside
with linux/atomic.h

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Aybuke Ozdemir <aybuke.147@gmail.com>
Cc: Chris Brannon <chris@the-brannons.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kirk Reiser <kirk@reisers.ca>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: Shradha Shah <sshah@solarflare.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: devel@driverdev.osuosl.org
Cc: linux-net-drivers@solarflare.com
Cc: speakup@linux-speakup.org
Link: http://lkml.kernel.org/r/1440589966-26280-1-git-send-email-boqun.feng@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-09-13 10:35:46 +02:00
Shraddha Barke a90624cf25 Staging: speakup: kobjects.c: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:25:00 -07:00
Shraddha Barke 114885e08c Staging: speakup: serialio.c: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:25:00 -07:00
Shraddha Barke 562c47982d Staging: speakup: devsynth.c: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:25:00 -07:00
Shraddha Barke ff52fc380d Staging: speakup: varhandlers.c: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:59 -07:00
Shraddha Barke ca0b6fe173 Staging: speakup: Remove braces for single statement blocks
The linux kernel coding style discourages use of braces for single
statement blocks. This patch removes the unnecessary braces.

The warning was detected using checkpatch.pl. Coccinelle was used to
make the change.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:53 -07:00
Aleksei Fedotov 13d825edd4 staging: speakup: Fix warning reported by checkpatch
This patch fixes the checkpatch.pl warnings:
WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments use * on subsequent lines

Signed-off-by: Aleksey Fedotov <lexa@cfotr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 17:38:16 -07:00
Joe Perches ad9f92d270 staging: speakup: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes.

Miscellanea:

o Reflow alignments

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 17:38:15 -07:00
Luis de Bethencourt 304e088451 staging: speakup: fix indentation
Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:01:55 -07:00
Fabian Frederick 590aeb174a staging: speakup: use swap() in get_highlight_color()
Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:19:47 -07:00
Shirish Gajera 63b8ebe44a staging: speakup: Fix warning of line over 80 characters.
This patch fixes the checkpatch.pl warning:
WARNING: line over 80 characters

All line over 80 characters in driver/staging/speakup/* are fixed.

Signed-off-by: Shirish Gajera <gshirishfree@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:43:45 +02:00
Vaishali Thakkar ae89faccc6 Staging: speakup: Use module_spk_synth
Macro module_spk_synth can be used for speakup drivers
whose init and exit paths does only module registrations.
So, here remove some boilerplate code by using
module_spk_synth.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:27:34 +01:00
Vaishali Thakkar c950a892cc Staging: speakup: Add helper macro for spk_synth boilerplate
For simple modules that contain a single spk_synth without
any additional setup code then ends up being a block of
duplicated boilerplate. This patch adds a new macro,
module_spk_synth(), which replaces the
module_init()/module_exit() registrations with template
functions.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:27:13 +01:00
Haneen Mohammed f7d63547ea Staging: speakup: Remove unused variable
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>
2015-03-09 13:30:40 +01:00
Aya Mahfouz 6de3f58bc3 staging: speakup: remove extra parentheses around right bit shift operation
Removes extra parentheses around bitwise right shift operation.
The case handled is  when the resultant value is assigned to
a variable. The issue was detected and resolved using the following
coccinelle script:

@@
expression e, e1;
constant c;
@@

e =
-(e1
+e1
>>
-c);
+c;

@@
identifier i;
constant c;
type t;
expression e;
@@

t i =
-(e
+e
>>
-c);
+c;

@@
expression e, e1;
identifier f;
constant c;
@@

e1 = f(...,
-(e
+e
>>
-c)
+c
,...);

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 15:22:43 -08:00
Katie Dunne 13d932f79c Staging: speakup: Remove 'extern' keywords from .h prototypes
Addresses checkpatch.pl check:
CHECK: Extern prototypes should be avoided in .h files

Removes the 'extern' keyword from function prototypes

Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 15:04:24 -08:00
Linus Torvalds 46f7b63556 Staging drivers patches for 3.20-rc1
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.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlTgtVQACgkQMUfUDdst+yk4mACgshYZ1fOQDoPR+BXd+QD1HXfh
 GosAoICXkSjDQjwVo13W6QHIVMsUezY+
 =4jHr
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

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-15 11:30:39 -08:00
Linus Torvalds 29afc4e9a4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
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-10 18:57:15 -08:00
Bastian Plettner d0e9ed58f4 staging: speakup: Remove unnecessary space
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-02-07 17:09:25 +08:00
Davidlohr Bueso 2be90fef97 drivers/staging: use current->state helpers
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-28 11:25:28 -08:00
Alan Cox 7aa4d5c8ff doubletalk: probe failure causes OOPS
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-20 13:56:05 +01:00
Panir.Nyan 25c048680b staging: speakup: Combine the consecutive string
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-17 16:14:16 -08:00
Panir.Nyan 05719ac7d5 staging: speakup: Split the comment to fit the length
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>
2015-01-17 16:14:16 -08:00
Esra Altintas 146ea83566 staging: speakup: Use time_after_eq to compare jiffies in speakup_keypc.c
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-20 10:29:19 +08:00
Esra Altintas c65cfb5e5a staging: speakup: remove jiffies comparison using time_after_eq() in speakup_dtlk.c
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-20 10:29:12 +08:00
Dilek Uzulmez 0f709488c5 staging: speakup: Change char * array type as static const
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-20 10:29:12 +08:00
Ebru Akagunduz 333c474b82 staging: speakup: Change char * array type as static const
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-20 10:29:12 +08:00
Yeliz Taneroglu 1f74d5f688 staging: speakup: Fixed else after return or break warning
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-20 10:29:12 +08:00
Melike Yurtoglu f79b0d9c22 staging: speakup: Fixed warning <linux/serial.h> instead of <asm/serial.h>
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-02 10:09:01 -07:00
Melike Yurtoglu 1a9c77d8c8 staging: speakup: Fix missing blank line warning
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-10-02 10:09:01 -07:00
Aybuke Ozdemir c772bce670 staging: speakup: Added blank line.
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-28 23:16:06 -04:00
Aybuke Ozdemir f6bb9e390c Staging: speakup: Fix trailing space
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-28 23:16:06 -04:00
Tapasweni Pathak 89021ecc83 staging: speakup: remove jiffies comparison using time_after_eq()
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-23 13:31:36 -07:00
Roxana Blaj 225557bf27 staging: speakup: fix checkpatch warning
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-19 17:27:28 -07:00
Roxana Blaj 0a3a725adb staging: speakup: fix checkpatch warning
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-19 17:27:28 -07:00
Nicoleta Birsan 472fe30efd Staging: speakup: fix checkpatch warning
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-19 17:27:28 -07:00
Domagoj Trsan 8e69a81106 staging: speakup: fix missing blank lines after declarations
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:54:51 -07:00
Domagoj Trsan e48735236b staging: speakup: fix line indentations
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:54:51 -07:00
Domagoj Trsan 11a18fc3d1 staging: speakup: fix redundant return in void functions
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:54:50 -07:00
Domagoj Trsan e7027b9b25 staging: speakup: fix warnings: line over 80 characters
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:53:53 -07:00
Samuel Thibault e6a152efae Update speakup mailing list address
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-18 16:36:29 -07:00
Anil Belur dd3fde11d3 staging: speakup: speakup_dectlk.c - use time_before_eq()
- 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-07-08 16:52:33 -07:00
Robin Schroer 3d3cb1bffd drivers/staging/speakup/main: fixed jiffie comparison
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-19 17:12:01 -07:00
Linus Torvalds 3f17ea6dea Merge branch 'next' (accumulated 3.16 merge window patches) into master
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-06-08 11:31:16 -07:00
Sasha Levin 8b9c012a42 Staging: speakup: don't die if accessing sysfs without synth
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-27 17:35:50 -07:00
Ben Hutchings 28a821c306 Staging: speakup: Update __speakup_paste_selection() tty (ab)usage to match vt
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-24 02:25:11 +09:00
Ben Hutchings d750013580 Staging: speakup: Move pasting into a work item
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-24 02:25:10 +09:00
Rusty Russell 478da752d0 speakup: fix incorrect perms on speakup_acntsa.c
22c9bcad85 contained a bad
substitution for ROOT_W => S_IRUSR|S_IRUGO instead of
S_IWUSR|S_IRUGO.

Fixes: 22c9bcad85
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:31:35 +09:00
Rusty Russell d901aaa723 drivers/staging/speakup/: avoid world-writable sysfs files.
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-05-23 20:31:22 +09:00
Greg Kroah-Hartman 3eb9992caf Merge 3.15-rc2 into staging-next
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-22 10:08:40 -07:00
Hayato Suzuki ea143c4f6a staging: speakup: fix typo in kobjects.c
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-18 15:54:32 -07:00
Daeseok Youn ef35a4f44b staging: speakup: fix misuse of kstrtol() in handle_goto()
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-16 11:41:44 -07:00
Linus Torvalds 6f4c98e1c2 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.
 
 Cheers,
 Rusty.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTQMH9AAoJENkgDmzRrbjxo4UP/jwlenP44v+RFpo/dn8Z8E2n
 SREQscU5ZZKvuyFD6kUdvOz8YC/nTrJvXoVkMUF05GVbuvb8/8UPtT9ECVemd0rW
 xNy4aFfv9rbrqRLBLpLK9LAgTuhwlbTgGxgL78zRn3hWmf1hBZWCY+cEvKM8l/+9
 oEQdORL0sUpZh7iryAeGqbOrXT4gqJEvSLOFwiYTSo6ryzWIilmdXSUAh6s8MIEX
 PR1+oH9J8B6J29lcXKMf8/sDI1EBUeSLdBmMCuN5Y7xpYxsQLroVx94kPbdBY+XK
 ZRoYuUGSUJfGRZY46cFKApIGeF07z1DGoyXghbSWEQrI+23TMUmrKUg47LSukE4Y
 yCUf8HAtqIA3gVc9GKDdSp/2UpkAhTTv5ogKgnIzs1InWtOIBdDRSVUQXDosFEXw
 6ZZe1pQs2zfXyXxO4j0Wq36K4RgI0aqOVw+dcC+w5BidjVylgnYRV0PSDd72tid7
 bIfnjDbUBo+o4LanPNGYK474KyO7AslgTE50w6zwbJzgdwCQ36hCpKqScBZzm60a
 42LrgTVoIHHWAL1tDzWL/LzWflZGdJAezzNje0/f2Q3bGMiNHWoljAvUphkTZ7qt
 E8+jWqmM+riH3e8Y5wKpO1BKt7NGHISEy//bUlnqTwisjIzVILZ6VjfugQ1AI+0x
 llTXPBotFvfvXqxunBg7
 =yzUO
 -----END PGP SIGNATURE-----

Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux

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-06 09:38:07 -07:00
Rusty Russell 22c9bcad85 staging: fix up speakup kobject mode
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-04-01 14:20:26 +10:30
Aybuke Ozdemir 94b9c616e6 staging/speakup:speakup_dectlk.c Fix line over 80 characters.
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-18 12:22:20 -07:00
Keerthimai Janarthanan 3a046c1915 staging: speakup: Prefer pr_err instead of printk(KERN_ERR)
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>
2014-03-18 11:13:37 -07:00
Grygorii Strashko 6c7b4ac936 mm/staging: remove unnecessary inclusion of bootmem.h
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-11 16:36:05 -08:00
Chen Gang 5e6dc548e4 drivers: staging: speakup: serialio: only use platform specific SERIAL_PORT_DFNS.
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-11-11 16:22:17 -08:00
Ashvini Varatharaj a8eecad5c9 Staging: speakup: replacing simple_strtoul with kstrtoul
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-19 14:51:06 -07:00
Ashvini Varatharaj c45a9a9bf3 Staging: speakup: removing jiffies comparison in speakup_apollo.c
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-19 05:27:19 -07:00
Ashvini Varatharaj 75b76b470f Staging: speakup: removing jiffies comparison using time_after_eq()
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-19 05:27:15 -07:00
Nandini Hanumanthagowda 1f2a55f23f staging: speakup: remove unnecessary space before semicolon
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-14 09:15:27 -07:00
Shalin Mehta ab06e0f20e staging: speakup: str initialization replaced with NULL where it was 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-10-03 13:50:54 -07:00
Christopher Brannon faf487b620 staging: speakup: kobjects.c: Use correct values when changing voice.
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-17 07:47:46 -07:00
Raphael S.Carvalho b71600bb4b staging/speakup/kobjects.c: Code improvement.
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-17 07:47:45 -07:00
Ben Hutchings ad6343a49e Staging: speakup: Add dependencies for ISA card drivers
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>
2013-09-17 07:47:45 -07:00
Emil Goode 7c10f1cd31 staging: speakup: fix warnings by adding __user annotations
This patch fixes the following sparse warnings by adding
__user annotations.

drivers/staging/speakup/speakup_soft.c:248:34: warning:
        incorrect type in argument 1 (different address spaces)
        drivers/staging/speakup/speakup_soft.c:248:34:
        expected void [noderef] <asn:1>*dst
        drivers/staging/speakup/speakup_soft.c:248:34:
        got char *[assigned] cp
drivers/staging/speakup/speakup_soft.c:272:40: warning:
        incorrect type in argument 1 (different address spaces)
        drivers/staging/speakup/speakup_soft.c:272:40:
        expected char const [noderef] <asn:1>*s
        drivers/staging/speakup/speakup_soft.c:272:40:
        got char const *buf
drivers/staging/speakup/speakup_soft.c:306:17: warning:
        incorrect type in initializer (incompatible argument 2
        (different address spaces))
        drivers/staging/speakup/speakup_soft.c:306:17:
        expected long ( *read )( ... )
        drivers/staging/speakup/speakup_soft.c:306:17:
        got long ( static [toplevel] *<noident> )( ... )
drivers/staging/speakup/speakup_soft.c:307:18: warning:
        incorrect type in initializer (incompatible argument 2
        (different address spaces))
        drivers/staging/speakup/speakup_soft.c:307:18:
        expected long ( *write )( ... )
        drivers/staging/speakup/speakup_soft.c:307:18:
        got long ( static [toplevel] *<nfile_operationsoident> )( ... )

drivers/staging/speakup/devsynth.c:29:41: warning:
        incorrect type in argument 2 (different address spaces)
        drivers/staging/speakup/devsynth.c:29:41:
        expected void const [noderef] <asn:1>*from
        drivers/staging/speakup/devsynth.c:29:41:    got char const *ptr
drivers/staging/speakup/devsynth.c:62:17: warning:
        incorrect type in initializer (incompatible argument 2
        (different address spaces))
        drivers/staging/speakup/devsynth.c:62:17:
        expected long ( *read )( ... )
        drivers/staging/speakup/devsynth.c:62:17:
        got long ( static [toplevel] *<noident> )( ... )
drivers/staging/speakup/devsynth.c:63:18: warning:
        incorrect type in initializer (incompatible argument 2
        (different address spaces))
        drivers/staging/speakup/devsynth.c:63:18:
        expected long ( *write )( ... )
        drivers/staging/speakup/devsynth.c:63:18:
        got long ( static [toplevel] *<noident> )( ... )

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:35:52 -07:00
Sachin Kamat 0012196c16 Staging: speakup/main: Staticize local symbols
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-22 15:35:39 -07:00
Sachin Kamat aee175f55a Staging: speakup/kobjects: Use NULL instead of 0
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-22 15:35:39 -07:00
Sachin Kamat ff471ea823 Staging: speakup/main: Use NULL instead of 0
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-22 15:35:38 -07:00
Sachin Kamat 0a0bd35518 Staging: speakup/speakup_keypc: Return NULL instead of 0
The function returns a pointer. Hence return NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:35:38 -07:00
Sachin Kamat 61b7a28428 Staging: speakup/speakup_dtlk: Return NULL instead of 0
The function returns a pointer. Hence return NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:35:38 -07:00
Sachin Kamat dbbe686368 Staging: speakup/speakup_acntpc: Return NULL instead of 0
The function returns a pointer. Hence return NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:35:38 -07:00
Lisa Nguyen f2ae62fe33 staging/speakup: Changed parameters in kstrtol()
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-21 13:53:42 -07:00
Lisa Nguyen 72381a1732 staging/speakup: Remove trailing whitespace in Kconfig
Removed trailing whitespace in Kconfig to meet kernel
documentation standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-17 14:53:50 -07:00
Lisa Nguyen a87af7c58b staging/speakup: Replaced deprecated function
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-17 14:53:50 -07:00
Lisa Nguyen 69d8ba5659 staging/speakup: Reformatted pointer variables
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-17 14:53:50 -07:00
Sachin Kamat 4e595c0d23 Staging: speakup: Fix return value in synth.c
The function return type is a pointer. Hence return NULL instead
of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:17:30 -07:00
Sachin Kamat 15ab600ce3 Staging: speakup: Fix sparse warning in varhandlers.c
'cp' is a pointer. Fix the incorrect comparison with integer to
avoid the below warning:
drivers/staging/speakup/varhandlers.c:283:19: warning:
Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:17:29 -07:00
Sachin Kamat 6eb178cebb Staging: speakup: Return NULL instead of 0 in speakup_decpc.c
The function returns a pointer. Hence return NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:17:29 -07:00
William Hubbs 667b614118 staging: speakup: remove custom locking macro definitions
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:14:50 -07:00
William Hubbs 6697330ac5 staging: speakup: synth: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:14:49 -07:00
William Hubbs 939d84ee09 staging: speakup: thread: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:14:49 -07:00
William Hubbs 89c9df1b79 staging: speakup: soft: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:14:48 -07:00
William Hubbs e6f1838373 staging: speakup: keypc: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:14:48 -07:00
William Hubbs 62c8c835ed staging: speakup: dtlk: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:14:47 -07:00
William Hubbs 68743d6b26 staging: speakup: dectlk: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:14:47 -07:00
William Hubbs 4d888b292a staging: speakup: decpc: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:14:47 -07:00
William Hubbs b4b93e32d7 staging: speakup: decext: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:11:10 -07:00
William Hubbs 6ca4dbe3a5 staging: speakup: apollo: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:11:09 -07:00
William Hubbs 995b904040 staging: speakup: acntpc: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:11:09 -07:00
William Hubbs 9fb31b1abd staging: speakup: serialio: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:11:09 -07:00
William Hubbs 8ec0826a38 staging: speakup: remove spk_trylock macro definition
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:11:08 -07:00
William Hubbs 3efe810f23 staging: speakup: main: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:11:08 -07:00
William Hubbs 550e579a37 staging: speakup: i18n: remove custom locking macros
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:11:08 -07:00
William Hubbs 2da11ba637 staging: speakup: devsynth: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:11:07 -07:00
William Hubbs c2d7f7430f staging: speakup: kobjects: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:11:07 -07:00
Dan Carpenter 65545eaea9 staging: speakup: cleanup spk_var_header_by_name()
There is a confusing while loop here and I have re-written it in
canonical for loop format.  Also I reversed the NULL check on "name" and
pulled everything in one tab stop.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 18:02:29 -04:00
Andy Shevchenko 576d742e4a staging: speakup: remove custom string_unescape_any_inplace
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>
2013-04-30 17:04:03 -07:00
Andy Shevchenko 3d2409d4f1 staging: speakup: fix a bug when translate octal numbers
There are actually overflow bug and typo. And bug was never happened due to the
typo.

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-04-09 12:36:43 -07:00
Valentin Ilie c6ac992b8f staging: speakup: selection.c fix typo in comment
Replace disallocated with deallocated

Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 15:03:09 -07:00
Andy Shevchenko 6a48f88b52 staging: speakup: use native error codes
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>
2013-03-29 08:41:15 -07:00
Andy Shevchenko 1627ab92b2 staging: speakup: reuse native kernel functions
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-03-29 08:41:15 -07:00
Linus Torvalds 21eaab6d19 tty/serial patches for 3.9-rc1
Here's the big tty/serial driver patches for 3.9-rc1.
 
 More tty port rework and fixes from Jiri here, as well as lots of
 individual serial driver updates and fixes.
 
 All of these have been in the linux-next tree for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlEmZYQACgkQMUfUDdst+ylJDgCg0B0nMevUUdM4hLvxunbbiyXM
 HUEAoIOedqriNNPvX4Bwy0hjeOEaWx0g
 =vi6x
 -----END PGP SIGNATURE-----

Merge tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial patches from Greg Kroah-Hartman:
 "Here's the big tty/serial driver patches for 3.9-rc1.

  More tty port rework and fixes from Jiri here, as well as lots of
  individual serial driver updates and fixes.

  All of these have been in the linux-next tree for a while."

* tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (140 commits)
  tty: mxser: improve error handling in mxser_probe() and mxser_module_init()
  serial: imx: fix uninitialized variable warning
  serial: tegra: assume CONFIG_OF
  TTY: do not update atime/mtime on read/write
  lguest: select CONFIG_TTY to build properly.
  ARM defconfigs: add missing inclusions of linux/platform_device.h
  fb/exynos: include platform_device.h
  ARM: sa1100/assabet: include platform_device.h directly
  serial: imx: Fix recursive locking bug
  pps: Fix build breakage from decoupling pps from tty
  tty: Remove ancient hardpps()
  pps: Additional cleanups in uart_handle_dcd_change
  pps: Move timestamp read into PPS code proper
  pps: Don't crash the machine when exiting will do
  pps: Fix a use-after free bug when unregistering a source.
  pps: Use pps_lookup_dev to reduce ldisc coupling
  pps: Add pps_lookup_dev() function
  tty: serial: uartlite: Support uartlite on big and little endian systems
  tty: serial: uartlite: Fix sparse and checkpatch warnings
  serial/arc-uart: Miscll DT related updates (Grant's review comments)
  ...

Fix up trivial conflicts, mostly just due to the TTY config option
clashing with the EXPERIMENTAL removal.
2013-02-21 13:41:04 -08:00
George Spelvin 593fb1ae45 pps: Move timestamp read into PPS code proper
The PPS (Pulse-Per-Second) line discipline has developed a number of
unhealthy attachments to core tty data and functions, ultimately leading
to its breakage.

The previous patches fixed the crashing.  This one reduces coupling further
by eliminating the timestamp parameter from the dcd_change ldisc method.
This reduces header file linkage and makes the extension more generic,
and the timestamp read is delayed only slightly, from just before the
ldisc->ops->dcd_change method call to just after.

Fix attendant build breakage in
    drivers/tty/n_tty.c
    drivers/tty/tty_buffer.c
    drivers/staging/speakup/selection.c
    drivers/staging/dgrp/dgrp_*.c

Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Chris Brannon <chris@the-brannons.com>
Cc: Kirk Reiser <kirk@braille.uwo.ca>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: George Spelvin <linux@horizon.com>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-13 10:13:58 -08:00
Joe Perches 78110bb8dc staging: Remove unnecessary OOM messages
alloc failures already get standardized OOM
messages and a dump_stack.

For the affected mallocs around these OOM messages:

Converted kzallocs with multiplies to kcalloc.
Converted kmallocs with multiplies to kmalloc_array.
Converted a kmalloc/strlen/strncpy to kstrdup.
Moved a spin_lock below a removed OOM message and
removed a now unnecessary spin_unlock.
Neatened alignment and whitespace.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-11 10:10:33 -08:00
Lijo Antony b3d07cf5a1 Staging: speakup: kobjects.c: checkpatch.pl fixes
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>
2013-01-17 13:31:07 -08:00
Lijo Antony ed52565565 Staging: speakup: keyhelp.c: checkpatch.pl fixes
Breaking 2 lines to fit 80 char limit

Signed-off-by: Lijo Antony <lijo.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 13:31:07 -08:00
Lijo Antony 5c75af1a45 Staging: speakup: buffers.c: checkpatch.pl fixes
Fixed two camel case issues.

Signed-off-by: Lijo Antony <lijo.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 13:31:07 -08:00
Greg Kroah-Hartman 17cb3be61b Merge branch 'staging-linus' into staging-next
This is to get the comedi fixes, and resolve the issue in comdi_test.c
and comedi_fops.c that were caused by changes in both branches.

It also allows the fwserial driver changes to be applied, as they
required the fixes that are in staging-linus.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 15:17:52 -08:00
Masanari Iida dbc320f749 staging: Add angle bracket before and after the URL
Add missing angle bracket before and after the URL.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 14:56:04 -08:00
Samuel Thibault d9f5420268 staging: speakup: Turn some symbols static
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-07 14:08:15 -08:00
Samuel Thibault ca2beaf84d staging: speakup: Prefix externally-visible symbols
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>
2013-01-07 14:06:31 -08:00
Samuel Thibault 6102c48bd4 staging: speakup: avoid out-of-range access in synth_add()
Check that array index is in-bounds before accessing the synths[] array.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: stable <stable@vger.kernel.org>
Cc: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 13:53:28 -08:00
Nickolai Zeldovich ae428655b8 staging: speakup: avoid out-of-range access in synth_init()
Check that array index is in-bounds before accessing the synths[] array.

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Cc: stable <stable@vger.kernel.org>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 13:53:28 -08:00
Linus Torvalds 3498d13b80 TTY merge for 3.7-rc1
As we skipped the merge window for 3.6-rc1 for the tty tree, everything
 is now settled down and working properly, so we are ready for 3.7-rc1.
 Here's the patchset, it's big, but the large changes are removing a
 firmware file and adding a staging tty driver (it depended on the tty
 core changes, so it's going through this tree instead of the staging
 tree.)
 
 All of these patches have been in the linux-next tree for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlBp36oACgkQMUfUDdst+yk4WgCdEy13hot8fI2Lqnc7W0LKu7GX
 4p8AoLTjzrXhLosxdijskDQ9X1OtjrxU
 =S5Ng
 -----END PGP SIGNATURE-----

Merge tag 'tty-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull TTY changes from Greg Kroah-Hartman:
 "As we skipped the merge window for 3.6-rc1 for the tty tree,
  everything is now settled down and working properly, so we are ready
  for 3.7-rc1.  Here's the patchset, it's big, but the large changes are
  removing a firmware file and adding a staging tty driver (it depended
  on the tty core changes, so it's going through this tree instead of
  the staging tree.)

  All of these patches have been in the linux-next tree for a while.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

Fix up more-or-less trivial conflicts in
 - drivers/char/pcmcia/synclink_cs.c:
    tty NULL dereference fix vs tty_port_cts_enabled() helper function
 - drivers/staging/{Kconfig,Makefile}:
    add-add conflict (dgrp driver added close to other staging drivers)
 - drivers/staging/ipack/devices/ipoctal.c:
    "split ipoctal_channel from iopctal" vs "TTY: use tty_port_register_device"

* tag 'tty-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (235 commits)
  tty/serial: Add kgdb_nmi driver
  tty/serial/amba-pl011: Quiesce interrupts in poll_get_char
  tty/serial/amba-pl011: Implement poll_init callback
  tty/serial/core: Introduce poll_init callback
  kdb: Turn KGDB_KDB=n stubs into static inlines
  kdb: Implement disable_nmi command
  kernel/debug: Mask KGDB NMI upon entry
  serial: pl011: handle corruption at high clock speeds
  serial: sccnxp: Make 'default' choice in switch last
  serial: sccnxp: Remove mask termios caps for SW flow control
  serial: sccnxp: Report actual baudrate back to core
  serial: samsung: Add poll_get_char & poll_put_char
  Powerpc 8xx CPM_UART setting MAXIDL register proportionaly to baud rate
  Powerpc 8xx CPM_UART maxidl should not depend on fifo size
  Powerpc 8xx CPM_UART too many interrupts
  Powerpc 8xx CPM_UART desynchronisation
  serial: set correct baud_base for EXSYS EX-41092 Dual 16950
  serial: omap: fix the reciever line error case
  8250: blacklist Winbond CIR port
  8250_pnp: do pnp probe before legacy probe
  ...
2012-10-01 12:26:52 -07:00
Ben Hutchings 40fe4f8967 staging: speakup_soft: Fix reading of init string
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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:32:50 -07:00
Paul Gortmaker 4b71598b6a serial: diminish usage of struct serial_uart_config
This structure might have made sense many years ago, but at this
point it is only used in one specific driver, and referenced in
stale comments elsewhere.  Rather than change the sunsu.c driver,
simply move the struct to be within the exclusive domain of that
driver, so it won't get inadvertently picked up and used by other
serial drivers going forward.  The comments referencing the now
driver specific struct are updated accordingly.

Note that 8250.c has a struct that is similar in usage, with the
name serial8250_config; but is 100% independent and untouched here.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05 13:15:07 -07:00
Samuel Thibault cfd7570106 speakup: lower default software speech rate
Speech synthesis beginners need a low speech rate, and trained people
want a high speech rate.  A medium speech rate is thus actually not a
good default for neither.  Since trained people will typically know how
to change the rate, better default for a low speech rate, which
beginners can grasp and learn how to increase it afterwards

This was agreed with users on the speakup mailing list.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:03:40 -07:00
Jesper Juhl fafbc202cd staging: speakup: i18n.c: Fix leak in msg_set()
If we end up returning -EINVAL from the function we will leak the
memory allocated to 'newstr' which has been allocated but not yet
assigned to anything.
Fix the leak by properly freeing the memory again before we return.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:32:13 -07:00
Justin P. Mattock 83414d528d staging "speakup" Fix typos.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 13:06:21 -07:00
Christopher Brannon 4ea418b8b2 Staging: speakup: fix an improperly-declared variable.
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-06-18 17:13:06 -07:00
Chris Yungmann e888fabd10 staging: speakup: fixed checkpatch and sparse warnings in selection.c
Signed-off-by: Chris Yungmann <yungmann.chris@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 12:20:16 -07:00
Jiri Slaby 3ee0017e03 TTY: speakup, do not use serialP
The structures there are going away. And speakup has enough troubles
already.

So define a structure similar to what 8250 does: old_serial_port.
There define an array of speed, port base and so on needed for
configuration. Then use this structure instead of serial_state defined
in serialP.h.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Chris Brannon <chris@the-brannons.com>
Cc: Kirk Reiser <kirk@braille.uwo.ca>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:47:02 -08:00
Alan Cox 079c9534a9 vt:tackle kbd_table
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>
2012-03-08 10:50:35 -08:00
Rusty Russell 90ab5ee941 module_param: make bool parameters really bool (drivers & misc)
module_param(bool) used to counter-intuitively take an int.  In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option.  For this version
it'll simply give a warning, but it'll break next kernel version.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-01-13 09:32:20 +10:30
Christopher Brannon 4afaee1561 Staging: speakup: Don't try to access an unallocated struct.
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-11-26 18:13:55 -08:00
Thomas Meyer 1aa5eb67d7 Staging: speakup: Use kmemdup rather than duplicating its implementation
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>
2011-11-26 18:12:56 -08:00
Andrew Morton 09f9390d79 drivers/staging/speakup/devsynth.c: fix "buffer size is not provably correct" error
x86_64 allmodconfig:

In file included from arch/x86/include/asm/uaccess.h:572,
                 from include/linux/uaccess.h:5,
                 from drivers/staging/speakup/devsynth.c:4:
In function 'copy_from_user',
    inlined from 'speakup_file_write' at drivers/staging/speakup/devsynth.c:28:
arch/x86/include/asm/uaccess_64.h:64: error: call to 'copy_from_user_overflow' declared with attribute error: copy_from_user() buffer size is not provably correct

I'm not sure what was unprovable about it, but size_t is the correct type
anyway.

Also replace needless min_t() with min()

Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-02 16:09:46 -07:00
Jesper Juhl 37ca936e1d Remove unneeded version.h includes from drivers/staging/speakup/
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-07-05 10:39:38 -07:00
Peter Huewe 6263ba5519 staging: speakup: Use kstrtoul_from_user
This patch replaces the code for getting an unsigned long from a
userspace buffer by a simple call to kstroul_from_user.
This makes it easier to read and less error prone.

Kernel Version: staging of 20110606

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28 14:35:41 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Ilia Mirkin 39dd3e5d7b staging: speakup: Remove NULL check before kfree
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-03-14 11:57:36 -07:00
Christopher Brannon 87be424a9a Staging: speakup: fix an out-of-bounds error.
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>
2011-02-23 14:39:09 -08:00
Timo von Holtz 2c62c674e0 staging: speakup: enlosed macros with complex values in parenthesis
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>
2011-02-04 13:01:02 -08:00
Greg Kroah-Hartman 949c3676cd Staging: Merge branch 'staging-next' into 2.6.38-rc3
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>
2011-02-02 13:35:58 -08:00
Christopher Brannon 628f34282d staging: speakup: more fixes for init-failure handling.
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-20 15:58:16 -08:00
roel kluin e7bf352fcd Staging: speakup: &&/|| confusion in silent_store()
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>
2011-01-20 12:06:07 -08:00
Linus Torvalds 949f6711b8 Merge branch 'staging-next' of 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
2011-01-10 16:04:53 -08:00
William Hubbs 7959d55679 staging: speakup: fix failure handling
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>
2011-01-10 12:26:10 -08:00
Christoph Lameter 5309665dcc fakekey: Simplify speakup_fake_key_pressed through this_cpu_ops
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>
2010-12-17 15:07:19 +01:00
Christoph Lameter 4a6f4fe837 drivers: Replace __get_cpu_var with __this_cpu_read if not used for an address.
__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>
2010-12-17 15:07:18 +01:00
Greg Kroah-Hartman ea3398a1ae Staging: Merge 2.6.37-rc5 into staging-next
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>
2010-12-07 10:47:56 -08:00
Greg Kroah-Hartman 8d7ee9c498 Merge branch 'master' into work 2010-11-29 10:44:22 -08:00
Arnd Bergmann 451a3c24b0 BKL: remove extraneous #include <smp_lock.h>
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>
2010-11-17 08:59:32 -08:00
Dan Carpenter 5fb5d38fc2 Staging: speakup: free after input_unregister_device()
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>
2010-11-16 12:25:52 -08:00
Tracey Dent a32d4acab4 Staging: speakup: spk_types: trival coding style issue
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>
2010-11-09 16:38:40 -08:00
Vasiliy Kulikov b3495cebaa staging: speakup: fix memory leak
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-19 10:10:54 -07:00
Vasiliy Kulikov 6a56486716 staging: speakup: fix leaks of sysfs groups
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>
2010-10-19 10:10:13 -07:00
William Hubbs a1277d85dc staging: speakup: varhandlers.c style fixes
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>
2010-10-19 10:06:05 -07:00
William Hubbs 7025005f15 staging: speakup: thread.c style fixes
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>
2010-10-19 10:06:05 -07:00
William Hubbs 1e560261b7 staging: speakup: synth.c style fixes
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>
2010-10-19 10:06:05 -07:00
William Hubbs baf9ac9ff8 staging: speakup: serialio.c style fixes
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>
2010-10-19 10:06:05 -07:00
William Hubbs a1768fbbd9 staging: speakup: selection.c style fixes
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>
2010-10-19 10:06:05 -07:00
William Hubbs 16d355156b staging: speakup: main.c style fixes
- 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-19 10:06:04 -07:00
William Hubbs f976520bee staging: speakup: i18n.c fix long lines
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>
2010-10-19 10:06:04 -07:00
Christopher Brannon 4073f1b6ab staging: speakup: speakup_dectlk.c: style fixes
* 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>
2010-10-15 12:22:38 -07:00
Christopher Brannon c3d5d98820 staging: speakup: speakup_txprt.c: style fixes
* 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>
2010-10-15 12:22:38 -07:00
Christopher Brannon 0d42cfe4c1 staging: speakup: speakup_spkout.c: style fixes
* 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>
2010-10-15 12:22:38 -07:00
Christopher Brannon 13f1a041ac staging: speakup: speakup_soft.c: style fixes
* 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>
2010-10-15 12:22:37 -07:00
Christopher Brannon e66c3d8475 staging: speakup: speakup_ltlk.c: style fixes
* 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>
2010-10-15 12:22:37 -07:00
Christopher Brannon 75d6282d8b staging: speakup: speakup_keypc.c: style fixes
* 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>
2010-10-15 12:22:37 -07:00
Christopher Brannon 9d096afa06 staging: speakup: speakup_dummy.c: style fixes
* 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>
2010-10-15 12:22:37 -07:00
Christopher Brannon 2c9e0cb07f staging: speakup: speakup_dtlk.c: style fixes
* 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>
2010-10-15 12:22:36 -07:00
Christopher Brannon 227e18d6b6 staging: speakup: speakup_decpc.c: style fixes
* 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>
2010-10-15 12:22:36 -07:00
Christopher Brannon 3d4f7eaf65 staging: speakup: speakup_decext.c: style fixes
* 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>
2010-10-15 12:22:36 -07:00
Christopher Brannon 64d1e5a098 staging: speakup: speakup_bns.c: style fixes
* 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>
2010-10-15 12:22:36 -07:00
Christopher Brannon d1c07c416c staging: speakup: speakup_audptr.c: style fixes
* 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>
2010-10-15 12:22:36 -07:00
Christopher Brannon f4931441ae staging: speakup: speakup_apollo.c: style fixes
* 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>
2010-10-15 12:22:35 -07:00
Christopher Brannon 28ba8677bc staging: speakup: speakup_acntsa.c: style fixes
* 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>
2010-10-15 12:22:35 -07:00
Christopher Brannon bf4a4bacb0 staging: speakup: speakup_acntpc.c: style fixes
* 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>
2010-10-15 12:22:35 -07:00
Randy Dunlap 0a652b9628 staging: speakup: fix printk format warning
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>
2010-10-14 12:14:10 -07:00
William Hubbs f1c6b7fb70 staging: speakup: kobjects.c: style fixes
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>
2010-10-12 10:50:42 -07:00
William Hubbs 09adcb52a6 staging: speakup: keyhelp.c: style fixes
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>
2010-10-12 10:50:42 -07:00
William Hubbs d09d3e2cdd staging: speakup: i18n.c: style fixes
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>
2010-10-12 10:50:41 -07:00
William Hubbs 29644b22da staging: speakup: devsynth.c: style fixes
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>
2010-10-12 10:50:41 -07:00
Tracey Dent d7cf430c54 Staging: speakup: i18n.c: cleaned up file
Cleaned up file with the use of checkpatch.pl.

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-11 15:02:29 -07:00
Tracey Dent ef999f10a6 Staging: speakup: serialio: Fixed errors in file
On line 40 printk() needed an KERN_* facility level, so I gave it
INFO. Also, fixed a C99 comment error.

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 19:49:26 -07:00
Tracey Dent a1823f2ec3 Staging: speakup: devsynth: file_operations should be const
Fixed file_operation struct, so that it is const.

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:26:25 -07:00
Tracey Dent 1bd15cfd79 Staging: speakup: keyhelp: Coding style fix
Put { on previous line, on line 34. Checkpatch.pl caught this.

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:26:24 -07:00
Tracey Dent 0c7023b2fb Staging: speakup: Makefile: Makefile clean up
Replaced <modules>-objs with <modules>-y in Makefile.

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:26:24 -07:00
Greg Kroah-Hartman 5b19208a5e Staging: speakup: fix speakup core to build properly
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-07 19:30:49 -07:00
William Hubbs c6e3fd22cd Staging: add speakup to the staging directory
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>
2010-10-07 19:22:31 -07:00