Commit Graph

415029 Commits

Author SHA1 Message Date
Matthias Oefelein 26ac5b4d43 beeceem: Fix broken indentations in InterfaceRx.c
Checkpatch reports a lot of spaces at the beginning of lines and other
wrong indentations. This patch fixes these issues.

Signed-off-by: Matthias Oefelein <ma.oefelein@arcor.de>
Signed-off-by: Ralph Mueck <linux-kernel@rmueck.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:59:27 -08:00
Matthias Oefelein d38eca9574 beeceem: Fix missing spaces between function arguments in InterfaceRx.c
This fix adds missing spaces after commas in function calls/definitions.

Signed-off-by: Matthias Oefelein <ma.oefelein@arcor.de>
Signed-off-by: Ralph Mueck <linux-kernel@rmueck.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:59:27 -08:00
Matthias Oefelein 1b42f1d954 beeceem: Fix missing spaces around operators and unwanted spaces around semicolons in InterfaceRx.c
Checkpatch reports missing spaces around operators; this patch
introduces spaces where needed.
Spaces before semicolons are prohibited by the official coding style
guidelines, those have been fixed as well.

Signed-off-by: Matthias Oefelein <ma.oefelein@arcor.de>
Signed-off-by: Ralph Mueck <linux-kernel@rmueck.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:59:27 -08:00
Ralph Mueck 4dcce62eaf beeceem: Replace C99-style comments with C89 pendants in InterfaceTx.c
Checkpatch complains about the use of //-comments, thus they are replaced by C89-style comments.

Signed-off-by: Ralph Mueck <linux-kernel@rmueck.de>
Signed-off-by: Matthias Oefelein <ma.oefelein@arcor.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:57:33 -08:00
Ralph Mueck d1c6c9caaf beeceem: Fix position of braces in conditional statements in InterfaceTx.c
This corrects the position of (opening) braces in if-conditionals to make checkpatch shut up.

Signed-off-by: Ralph Mueck <linux-kernel@rmueck.de>
Signed-off-by: Matthias Oefelein <ma.oefelein@arcor.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:57:33 -08:00
Ralph Mueck 5bbf5e66ab beeceem: Add spaces before opening parentheses in if-conditionals in InterfaceTx.c
This patch adds spaces before the opening parentheses of if-conditionals to comply with offical code styling guidelines.

Signed-off-by: Ralph Mueck <linux-kernel@rmueck.de>
Signed-off-by: Matthias Oefelein <ma.oefelein@arcor.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:57:32 -08:00
Ralph Mueck e84b8bacf3 beeceem: Fix several whitespace issues in InterfaceTx.c
This patch takes care of the following issues:
	- missing spaces at variable assignments
	- missing spaces between function arguments
	- spaces at the beginning of a line where tabs should be
	- prohibited spaces before a (semi)colon

Signed-off-by: Ralph Mueck <linux-kernel@rmueck.de>
Signed-off-by: Matthias Oefelein <ma.oefelein@arcor.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:57:32 -08:00
Laura Abbott 175f5475fb staging: lustre: Use is_vmalloc_addr
Instead of manually checking the bounds of VMALLOC_START and
VMALLOC_END, just use is_vmalloc_addr. That's what the function
was designed for.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:54:32 -08:00
Ben Hutchings 731becf831 staging: lustre: Make LUSTRE_LLITE_LLOOP tristate
There seems to be no reason why it can't be a module; in fact that is
currently supposed to be the default.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:53:26 -08:00
Masanari Iida 83bffc8125 staging: lustre: Remove braces for single statement in kernel_user_comm.c
This patch fixed "WARNING: braces {} are not necessary for
single statement blocks" found by checkpatch.pl in
kernel_user_comm.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:52:43 -08:00
Masanari Iida 5152bda8ee staging: lustre: Fix do not use C99 // comments in lcommon_cl.c
This patch fixed "ERROR: do not use C99 // comments" found by
checkpatch.pl in lcommon_cl.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:52:43 -08:00
Masanari Iida d063192134 staging: lustre: Fix space prohibited between function name and open parenthesis in lcommon_cl.c
This patch fixed "WARNING: space prohibited between function name
and open parenthesis '(' found by checkpatch.pl,
in lustre/lclient/lcommon_cl.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:52:43 -08:00
Masanari Iida 57c4b12734 staging: lustre: Fix do not use C99 // comments in mgc_request.c
This patch fixed "ERROR: do not use C99 // comments"
found by checkpatch.pl in lustre/lustre/mgc_request.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:50:34 -08:00
Masanari Iida 3126b4d121 staging: lustre: Fix brace {} are not necessary for single statement blocks
This patch fixed "WARNING: braces {} are not necessary for
single statement blocks" in lustre/lustre/mgc_request.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:50:34 -08:00
Masanari Iida 37821997e7 lustre: Fix space required before the open parenthesis in mgc_required.c
This patch fixed "ERROR: space required before the open
parenthesis'('" found by checkpatch.pl in
lustre/lustre/mgc/mgc_request.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:50:34 -08:00
Rashika Kheria f4ad847a9f drivers: dgnc: Include appropriate header file in dgnc_trace.c
Include appropriate header file dgnc/dgnc_trace.h in dgnc_trace.c
because function dgnc_tracer_free() has its prototype declaration in the
header file.

This eliminates the following warning in dgnc_trace.c:
drivers/staging/dgnc/dgnc_trace.c:180:6: warning: no previous prototype for ‘dgnc_tracer_free’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:47:35 -08:00
Rashika Kheria f5aae444ae drivers: bcm: Remove unused function in nvm.c
Remove unused function PropagateCalParamsFromEEPROMToMemory() in nvm.c.

This eliminates the following warning in nvm.c:
drivers/staging/bcm/nvm.c:1369:5: warning: no previous prototype for ‘PropagateCalParamsFromEEPROMToMemory’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:46:08 -08:00
Rashika Kheria 8e586897d4 drivers: bcm: Mark functions as static in Qos.c
Mark functions MatchSrcIpAddress(), MatchDestIpAddress() and MatchTos()
as static in Qos.c because they are not used outside this file.

This eliminates the following warnings in Qos.c:
drivers/staging/bcm/Qos.c:27:6: warning: no previous prototype for ‘MatchSrcIpAddress’ [-Wmissing-prototypes]
drivers/staging/bcm/Qos.c:61:6: warning: no previous prototype for ‘MatchDestIpAddress’ [-Wmissing-prototypes]
drivers/staging/bcm/Qos.c:94:6: warning: no previous prototype for ‘MatchTos’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:46:08 -08:00
Rashika Kheria 39e2ce9a35 drivers: sbe-2t3e3: Mark functions as static in ctrl.c
Mark functions t3e3_set_loopback(), t3e3_reg_read(), t3e3_reg_write(),
t3e3_port_get(), t3e3_port_set(), t3e3_port_get_stats() and
t3e3_port_del_stats() as static in ctrl.c because they are not used
outside this file.

This eliminates the following warnings in ctrl.c:
drivers/staging/sbe-2t3e3/ctrl.c:34:6: warning: no previous prototype for ‘t3e3_set_loopback’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:98:6: warning: no previous prototype for ‘t3e3_reg_read’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:135:6: warning: no previous prototype for ‘t3e3_reg_write’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:167:6: warning: no previous prototype for ‘t3e3_port_get’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:172:6: warning: no previous prototype for ‘t3e3_port_set’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:219:6: warning: no previous prototype for ‘t3e3_port_get_stats’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:285:6: warning: no previous prototype for ‘t3e3_port_del_stats’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:45:24 -08:00
Rashika Kheria 22bf290e88 drivers: sm7xxfb: Mark function as static in sm7xxfb.c
Mark function smtcfb_setmode() as static in sm7xxfb.c because it is not
used outside this file.

This eliminates the following warning in sm7xxfb.c:
drivers/staging/sm7xxfb/sm7xxfb.c:588:6: warning: no previous prototype for ‘smtcfb_setmode’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:45:24 -08:00
Rashika Kheria 634fc892de drivers: dgap: Include appropriate header file in dgap_parse.c
Include appropriate header file in dgap/dgap_parse.h in dgap_parse.c
because functions dgap_parsefile(), dgap_config_get_useintr(),
dgap_config_get_altpin(), dgap_find_config(),
dgap_config_get_number_of_ports(), dgap_create_config_string() and
dgap_get_config_letters() have their prototype declarations in the
header file.

This eliminates the following warnings in dgap_parse.c:
drivers/staging/dgap/dgap_parse.c:125:5: warning: no previous prototype for ‘dgap_parsefile’ [-Wmissing-prototypes]
drivers/staging/dgap/dgap_parse.c:1101:6: warning: no previous prototype for ‘dgap_config_get_useintr’ [-Wmissing-prototypes]
drivers/staging/dgap/dgap_parse.c:1128:6: warning: no previous prototype for ‘dgap_config_get_altpin’ [-Wmissing-prototypes]
drivers/staging/dgap/dgap_parse.c:1157:15: warning: no previous prototype for ‘dgap_find_config’ [-Wmissing-prototypes]
drivers/staging/dgap/dgap_parse.c:1223:6: warning: no previous prototype for ‘dgap_config_get_number_of_ports’ [-Wmissing-prototypes]
drivers/staging/dgap/dgap_parse.c:1252:7: warning: no previous prototype for ‘dgap_create_config_string’ [-Wmissing-prototypes]
drivers/staging/dgap/dgap_parse.c:1311:7: warning: no previous prototype for ‘dgap_get_config_letters’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:43:21 -08:00
Rashika Kheria 9c5f179196 drivers: dgap: Include appropriate header file in dgap_trace.c
Include appropriate header file dgap/dgap_trace.h in dgap_trace.c
because function dgap_tracer_free() have its prototype declaration in
the header file.

This eliminates the following warning in dgap_trace.c:
drivers/staging/dgap/dgap_trace.c:181:6: warning: no previous prototype for ‘dgap_tracer_free’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:43:21 -08:00
Liu Ying 7fc6cb2876 staging: imx-drm: imx-tve: Fix a sparse warning
This patch declares the function of_get_tve_mode
as a static one to fix this sparse warning:
drivers/staging/imx-drm/imx-tve.c:563:11: warning: \
symbol 'of_get_tve_mode' was not declared. \
Should it be static?

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:40:47 -08:00
Greg Kroah-Hartman 8a3cecf503 Third round of new drivers, features and cleanups for IIO in the 3.14 cycle.
One new driver a spot of new functionality and a cleanup.
 
 * New driver for the Capella CM32181 ambient light sensor. This is the first
   driver directly from Kevin at Capella with more already in the pipeline.
 * Support for configurable predividers on the mxs lradc
 * Convert a field to a bitmap in mxs lradc instead of using an array of
   unsigned longs to store boolean values.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJSzaveAAoJEFSFNJnE9BaInqIQAKZeBFS64HkWCU+fPF62gRCT
 VLkfPvzOSIYctKuTQCVggAeJUt6lDVZT23r/Oy2GSenkcvL/xVy+GRSFM6ZZ7vhN
 cyOHKwq1sSZV+ZSQNKdHxRAEla41qy8tvCKe1XseYKERi8JJnhxwB4Hcb1gTvmqo
 LN9wh1zfV5XZTq7i/vcBVVM/SYrDxJmapbNW1wa3Ytx65VzCYsb3iIHDzxaZh33Y
 WtjLRnyCDavTY19gg4K4/c6+IPgLi+VM2oN7GDdKSaT4jGAq5eVzrqWQ+s+WjAGj
 0HZ0dt6QDo21P0moO1RIhgE7uN3TpJeEHL1oB5SBV/0VpBcDcZDmaVz2VMQuL1Iv
 tmY0Gf4sz2z3VnbA7DfKWIUSpF8j2pnPPzUEC+wUrkP50QEwzbH5jsop8CzUa9PT
 Rm88DXKr7oUB3y8apC1HsadS1dnIr7wloZCj5gbQ70TnpJat625Y+mhKawRUUGms
 fSyY/C+O+5VrTw0+usCLB1EtMty2aDM/2pQcTiMdRvG58F9hIcpZTGybwViPQPta
 Lf1a82n5LF8HKrdq10mpCJnuB9VDoQqvdtPJDQ8QNFr6aGRih0HFliZ4OpGOD7mo
 bOj68VEI9u4Hjc7dUoZ6HLiA/v6mMUme01422dN5rRQmWjzeaEyQibAq3XZKnr4i
 gBnUKoGHFHil6KxOrYU3
 =VaZB
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-3.14c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Third round of new drivers, features and cleanups for IIO in the 3.14 cycle.

One new driver a spot of new functionality and a cleanup.

* New driver for the Capella CM32181 ambient light sensor. This is the first
  driver directly from Kevin at Capella with more already in the pipeline.
* Support for configurable predividers on the mxs lradc
* Convert a field to a bitmap in mxs lradc instead of using an array of
  unsigned longs to store boolean values.
2014-01-08 12:23:35 -08:00
Martin Hofmann edd236afc8 vt6655: fix printk usage in wpactl.c
This patch fixes the usage of printk in wpactl.c concering one missing log level
occurence and some whitespaces before a newline.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:06:10 -08:00
Martin Hofmann 91d9b19aeb vt6655: remove typedefs in wpactl.h
wpactl.h contained some typedefs for enums. These were removed in this patch.
Also, a typedef for a type "unsigned long long" that was only instantiated in
one place was removed and its declaration altered.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:05:20 -08:00
Martin Hofmann 0027d9a7bd vt6655: fix indentation in wroute.c
This patch fixes indentation style belonging to function calls as well as some
run-away closing parentheses when calling functions.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:04:46 -08:00
Martin Hofmann ed07c0e39b vt6655: remove unnecessary braces in wroute.c
This patch removes some unnecessary braces concerning if-statements in the file
wroute.c

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:04:46 -08:00
Martin Hofmann 85d396b5fd vt6655: remove casts in wroute.c
The file wroute.c contained some silly casts. This patch removes them.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:04:46 -08:00
Martin Hofmann 4d60901849 vt6655: balance faulty parentheses in 80211hdr.h
The file 80211hdr.h contained the macro WLAN_GET_FC_PRVER(n). The big endian
fashion of this macro had unbalanced parentheses. This patch removes the
parentheses in question.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:04:46 -08:00
Dan Carpenter 3b371fe4d2 staging: vt6656: remove an unneeded NULL check
We dereference "param->u.wpa_key.key" on the next line so the check
here is inconsistent.  This is only called from iwctl_siwencodeext() and
"param->u.wpa_key.key" is a valid pointer.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:02:13 -08:00
Dan Carpenter 1c5ebaae42 staging: vt6655: check too restrictive (off by one)
key_len == MAX_KEY_LEN is valid but we return an error.

Introduced-by: 6b7200fe0a ('Staging: vt6655: memory corruption in check in wpa_set_wpadev()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:02:13 -08:00
Malcolm Priestley 6e28024e16 staging: vt6656: CARDqGetNextTBTT replace code using do_div.
uBeaconInterval becomes u32

get next TBTT value using vendor's equation as shown.

This patch was checked against the original code
and yields exactly the same value.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:02:13 -08:00
Malcolm Priestley 9acec059c0 staging: vt6656: CARDqGetNextTBTT correct uLowNextTBTT
value uLowNextTBTT yields wrong value.

ULL is needed with qwTSF

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: stable@vger.kernel.org # v3.9+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:02:13 -08:00
Simon Schuster 98e5491731 Staging: vt6656: Reduce line length of bssdb.c
Long lines are split into multiple ones to reduce the line length.
Additionally some alignment fixes are made that previous patches
missed.

Unfortunately, due to the high indentation levels present in parts of
bssdb.c, this patch leaves some lines which are longer than 80
characters.

Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: Simon Schuster <linux@rationality.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07 17:17:59 -08:00
Sebastian Rachuj 5918ed4203 Staging: vt6656: Remove explicit comparisons against NULL
Explicit comparisons of pointers agains NULL
(like if (p != NULL) ...) are not as readable as the implicit
comparison (like if (p) ...). This patch converts all these explicit
comparisons to implicit ones.

Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: Simon Schuster <linux@rationality.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07 17:17:58 -08:00
Sebastian Rachuj 72cac30225 Staging: vt6656: Remove bogus parentheses in conditions
Removes unrequired parentheses around comparisons in complex
conditions.

Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: Simon Schuster <linux@rationality.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07 17:17:58 -08:00
Simon Schuster 8f284d79fc Staging: vt6656: Combined nested conditions
This patch reduces the level of indentation in bssdb.c of the vt6656
driver by transforming nested conditions to a series of logical
conjunctions. E.g.

if (cond1) {
        if (cond2) {
                block();
        }
}

is transformed to

if (cond1 && cond2) {
        block();
}

Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: Simon Schuster <linux@rationality.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07 17:17:58 -08:00
Simon Schuster b7fce6aec1 Staging: vt6656: Correct usage of braces
Conforming to the linux coding style guidelines, a single line block
of an if statement does not require curly braces unless another block
of the if cascade requires them. Therefore unnecessary curly braces
are removed by this patch and missing ones are added.

Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: Simon Schuster <linux@rationality.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07 17:17:58 -08:00
Simon Schuster fd2251e233 Staging: vt6656: Combine "else { if" to "else if"
This patch combines single ifs within the block of an else to a single
else if statement.

Therefore code that looks like that

else {
	if (cond) {
		statements;
	} else {
		other_statements;
	}
}

is converted to code that looks like that

else if (cond) {
	statements;
} else {
	other_statements;
}

Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: Simon Schuster <linux@rationality.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07 17:17:58 -08:00
Simon Schuster 6c64bf8af9 Staging: vt6656: Remove unnecessary spaces in format strings
A space in a format string is unnecessary if it is followed by a line
feed. These spaces are removed by this patch.

Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: Simon Schuster <linux@rationality.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07 17:17:58 -08:00
Simon Schuster dad2ddbdbf Staging: vt6656: Remove line feeds before else
An else belongs in the same line as the closing curly brace of the
previous block. Hence, this patch removes line feeds separating a
curly brace from the corresponding else.

Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: Simon Schuster <linux@rationality.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07 17:17:58 -08:00
Simon Schuster 77226ed70b Staging: vt6656: Correct single space mistakes
Adds missing spaces between an if-statement and its condition as well
as between the condition and the following curly brace. At casts
there is also a space added between the type and the variable.

Spaces that either follow an opening parenthese or the sizeof operator
or that preceed semicolons are removed as well.

Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: Simon Schuster <linux@rationality.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07 17:17:58 -08:00
Simon Schuster e435ef1626 Staging: vt6656: Correct operator coding style
Adds spaces around operators (like &&, ||, !=, +, ...) and removes
spaces before postfix increment and decrement operators. Parentheses
around return values are removed, too.

Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: Simon Schuster <linux@rationality.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07 17:17:58 -08:00
Simon Schuster 13a36fe9aa Staging: vt6656: Remove unnecessary semicolons
After some blocks in bssdb.c there are semicolons that are not
required to be there. Therefore they are removed with this patch.

Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: Simon Schuster <linux@rationality.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07 17:17:58 -08:00
Simon Schuster 14feab1763 Staging: vt6656: Adjust comments in bssdb.c
Changes C99-style comments to C89-style ones to conform to the linux
coding guidelines. Additionally removes plus and minus signs from the
function description comments.

Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: Simon Schuster <linux@rationality.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07 17:17:58 -08:00
Simon Schuster 0863b4e21f Staging: vt6656: Fix indentation of bssdb.c
Corrects indentation by using tabs instead of spaces. This also
includes modification of the alignment of multi-line expressions and
statements.

Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: Simon Schuster <linux@rationality.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07 17:17:54 -08:00
Alexandre Belloni 38125b2c93 iio: mxs-lradc: convert is_divided to a bitmap
mxs_lradc.is_divided was an unsigned long array. Convert it to a bitmap to save
some memory.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-01 14:31:56 +00:00
Hector Palacios aba70f2a58 iio: mxs-lradc: add write_raw function to modify scale
Added write_raw function to manipulate the optional divider_by_two
through the scaling attribute out of the available scales.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-01 14:28:19 +00:00
Hector Palacios d5acf5942b iio: mxs-lradc: add scale_available file to channels
Adds in_voltageX_scale_available file for every channel to read
the different available scales.
There are two scales per channel:
 [0] = divider_by_two disabled (default)
 [1] = divider_by_two enabled
The scale is a struct made of integer and nano parts to build
a long decimal number.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-01 14:25:18 +00:00