Commit Graph

621012 Commits

Author SHA1 Message Date
Brian Masney f3b0deea89 include: linux: iio: add IIO_ATTR_{RO, WO, RW} and IIO_DEVICE_ATTR_{RO, WO, RW} macros
Add new macros: IIO_ATTR_RO, IIO_ATTR_WO, IIO_ATTR_RW,
IIO_DEVICE_ATTR_RO, IIO_DEVICE_ATTR_WO and IIO_DEVICE_ATTR_RW to reduce
the amount of boiler plate code that is needed for creating new
attributes. This mimics the *_RO, *_WO, and *_RW macros that are found
in include/linux/device.h and include/linux/sysfs.h.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-10-01 14:43:59 +01:00
Bhumika Goyal a9a0d64a8b iio: Declare event_attrs field of iio_info structure as const
The event_attrs field of iio_info structure is only initialized once
whenever an object of iio_info is created. After that this field
is never modified again anywhere in the kernel. So, declare event_attrs
field of iio_info as a const struct attribute_group.
Checked for occurences throughout the kernel using grep and
coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-10-01 14:37:35 +01:00
Bhumika Goyal 1cb3576958 Staging:iio:light:tsl2583: constify attribute_group structures
Check for attribute_group structures that are only stored in the
attrs filed of iio_info structure. As the attrs field of iio_info
structures is constant, so these attribute_group structures can also be
declared constant.
Done using coccinelle

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before: drivers/staging/iio/light/tsl2583.o
   text	   data	    bss	    dec	    hex	filename
   6529	   1052	      0	   7581	   1d9d
drivers/staging/iio/light/tsl2583.o

File size after: drivers/staging/iio/light/tsl2583.o
   text	   data	    bss	    dec	    hex	filename
   6593	    988	      0	   7581	   1d9d
drivers/staging/iio/light/tsl2583.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 21:08:49 +01:00
Bhumika Goyal d306ddbad1 Staging:iio:adc:ad7280a: constify attribute_group structures
Check for attribute_group structures that are only stored in the
attrs filed of iio_info structure. As the attrs field of iio_info
structures is constant, so these attribute_group structures can also be
declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before: drivers/staging/iio/adc/ad7280a.o
   text	   data	    bss	    dec	    hex	filename
   6487	    584	    776	   7847	   1ea7
drivers/staging/iio/adc/ad7280a.o

File size after: drivers/staging/iio/adc/ad7280a.o
   text	   data	    bss	    dec	    hex	filename
   6551	    544	    776	   7871	   1ebf
drivers/staging/iio/adc/ad7280a.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 21:08:48 +01:00
Brian Masney ea908ab69e staging: iio: isl29018: fix comparison between signed and unsigned integers
Fixes warning found by make W=2:
warning: comparison between signed and unsigned integer expressions

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 21:08:47 +01:00
Brian Masney 528021fcd2 staging: iio: isl29018: made error handling consistent
Changed the processing of IIO_CHAN_INFO_INT_TIME in isl29018_write_raw()
to unlock the mutex and return at the end of the function if invalid
input is passed in. This makes the error handling code consistent with
the processing of IIO_CHAN_INFO_CALIBSCALE and IIO_CHAN_INFO_SCALE
within the same function.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 21:08:47 +01:00
Brian Masney 7fd1accc9f staging: iio: isl29018: remove unused variable and defines
Removes unused variable and associated #defines that was found using
make W=1.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 21:08:46 +01:00
Sandhya Bankar 69c72ec9c8 drivers: iio: magnetometer: Fix sparse endianness warnings cast to restricted __be16
Fix the following sparse endianness warnings:

drivers/iio/magnetometer/ak8975.c:716:16: warning: cast to restricted __le16
drivers/iio/magnetometer/ak8975.c:837:19: warning: cast to restricted __le16
drivers/iio/magnetometer/ak8975.c:838:19: warning: cast to restricted __le16
drivers/iio/magnetometer/ak8975.c:839:19: warning: cast to restricted __le16

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 21:08:45 +01:00
Matt Ranostay 67e17300dc iio: potentiostat: add LMP91000 support
Add support for the LMP91000 potentiostat which is used for chemical
sensing applications.

Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 20:33:03 +01:00
Matt Ranostay 92f0afb5b2 iio: adc: ti-adc161s626: add regulator support
Allow IIO_CHAN_INFO_SCALE and IIO_CHAN_INFO_OFFSET attributes for
processing by checking voltage from a regulator.

Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 20:33:03 +01:00
Matt Ranostay 0023e67dd8 iio: inkern: add iio_read_channel_offset helper
Allow access to underlying channel IIO_CHAN_INFO_OFFSET from a consumer.

Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 20:33:02 +01:00
Sandhya Bankar 2a20af722d drivers: iio: light: Fix sparse warnings
Fixing below warnings:

drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16
drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16
drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16
drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 20:33:01 +01:00
Lars-Peter Clausen aa16c6bd0e iio:adc: Add support for AD7766/AD7767
Add support for the AD7766, AD7766-1, AD7766-2, AD7767, AD7767-1, AD7767-2
Analog to Digital converters. It's a family of single channel 24-bit SAR
ADCs. They are all digital interface compatible and the main difference is
the internal decimation rate and analog performance. For communication with
the host processor a SPI interface is used.

In addition the part has a data ready pin that is pulsed for one MCLK cycle
when a conversion has completed and can be used as a IIO trigger.

Datasheets:
	http://www.analog.com/media/en/technical-documentation/data-sheets/AD7766.pdf
	http://www.analog.com/media/en/technical-documentation/data-sheets/AD7767.pdf

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 20:33:01 +01:00
Lars-Peter Clausen bea15d5139 iio:max1027: Use iio_trigger_validate_own_device() helper
Use the new iio_trigger_validate_own_device() to verify that the trigger
can only be attached to the matching IIO device rather than using a custom
variant.

While the implementation of iio_trigger_validate_own_device() and the
custom variant and are not identical their behaviour is.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 20:33:00 +01:00
Lars-Peter Clausen 19808e0467 iio:mma8452: Use new iio_trigger_validate_own_device() helper
Use the new iio_trigger_validate_own_device() to verify that the trigger
can only be attached to the matching IIO device rather than using a custom
variant.

While the implementation of iio_trigger_validate_own_device() and the
custom variant and are not identical their behaviour is.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 20:32:59 +01:00
Lars-Peter Clausen 43ece27e70 iio:trigger: Add helper function to verify that a trigger belongs to the same device
Some triggers can only be attached to the IIO device that corresponds to
the same physical device. Currently each driver that requires this
implements its own trigger validation function.

Introduce a new helper function called iio_trigger_validate_own_device()
that can be used to do this check. Having a common implementation avoids
code duplication and unnecessary boiler-plate code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 20:32:55 +01:00
Sandhya Bankar 38e442fc8b drivers: iio: dac: Fix sparse warning
Fixing below warnings:

drivers/iio/dac/ad5592r.c:58:41: warning: incorrect type in argument 2 (different base types)
drivers/iio/dac/ad5592r.c:58:41:    expected unsigned short [usertype] *buf
drivers/iio/dac/ad5592r.c:58:41:    got restricted __be16 *<noident>
drivers/iio/dac/ad5592r.c:62:41: warning: incorrect type in argument 2 (different base types)
drivers/iio/dac/ad5592r.c:62:41:    expected unsigned short [usertype] *buf
drivers/iio/dac/ad5592r.c:62:41:    got restricted __be16 *<noident>
drivers/iio/dac/ad5592r.c:92:41: warning: incorrect type in argument 2 (different base types)
drivers/iio/dac/ad5592r.c:92:41:    expected unsigned short [usertype] *buf
drivers/iio/dac/ad5592r.c:92:41:    got restricted __be16 *<noident>
drivers/iio/dac/ad5592r.c:110:41: warning: incorrect type in argument 2 (different base types)
drivers/iio/dac/ad5592r.c:110:41:    expected unsigned short [usertype] *buf
drivers/iio/dac/ad5592r.c:110:41:    got restricted __be16 *<noident>

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-27 20:25:32 +01:00
Sandhya Bankar 58b90a8d2c drivers: iio: max1027: Fix sparse warning: "dubious: x | !y"
Fixing below warning:
drivers/iio/adc/max1027.c:241:34: warning: dubious: x | !y .

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-24 17:12:13 +01:00
Markus Elfring 057ac1acdf iio: Use kmalloc_array() in iio_scan_mask_set()
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-24 16:35:24 +01:00
Wei Yongjun 1b14adcaf6 iio: accel: mma7660: fix non static symbol warning
Fixes the following sparse warning:

drivers/iio/accel/mma7660.c:42:11: warning:
 symbol 'mma7660_nscale' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-24 16:25:34 +01:00
Mugunthan V N 44c5ba96ec tools: iio: iio_generic_buffer: fix argument '?' option
When help ('?') option is passed to the command, the help text
printed but not from '?' switch case of getopt_long() but as a
invalid argument as below. Fix this by adding '?' to opt_String
of getopt_long().

root@am437x-evm:~# ./iio_generic_buffer -?
./iio_generic_buffer: invalid option -- '?'
Usage: generic_buffer [options]...
Capture, convert and output data from IIO device buffer
  -a         Auto-activate all available channels
...

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-22 18:46:39 +01:00
Arnd Bergmann 59dc1c8619 iio:pressure: zpa2326: remove redundant "DEBUG" ifdef
The -Wempty-body gcc warning triggers in the newly added zpa2326 driver:

drivers/iio/pressure/zpa2326.c: In function 'zpa2326_dequeue_pressure':
drivers/iio/pressure/zpa2326.c:578:3: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]

The use of an empty statement behind 'if (...)' is harmless here, but
it shows that the dev_dbg() macro is not used correctly: when the "DEBUG"
macro is not set, dev_dbg() already defaults to a no-operation, though
one that lets the compiler know that the arguments are used, and lets
it check the format string.

Fixing this also simplifies the driver.

Fixes: 03b262f2bb ("iio:pressure: initial zpa2326 barometer support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-22 18:43:59 +01:00
Arnd Bergmann a1427af599 iio: accel: sca3000_core: avoid potentially uninitialized variable
The newly added __sca3000_get_base_freq function handles all valid
modes of the SCA3000_REG_ADDR_MODE register, but gcc notices
that any other value (i.e. 0x00) causes the base_freq variable to
not get initialized:

drivers/staging/iio/accel/sca3000_core.c: In function 'sca3000_write_raw':
drivers/staging/iio/accel/sca3000_core.c:527:23: error: 'base_freq' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This adds explicit error handling for unexpected register values,
to ensure this cannot happen.

Fixes: e0f3fc9b47 ("iio: accel: sca3000_core: implemented IIO_CHAN_INFO_SAMP_FREQ")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-22 18:36:57 +01:00
Sandhya Bankar a04c28d079 Staging: speakup: kobjects: Add space around the operator.
This issue was found by checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 12:01:14 +02:00
Sandhya Bankar 114c9ec2fd Staging: speakup: varhandlers: Add space around the operator.
This patch was found by checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:56:54 +02:00
Rehas Sachdeva 7725066f1b staging: slicoss: Move NULL test closer to assignment
Move the test to check if a variable is NULL, to right after it is being
assigned, rather than some statements later.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:48 +02:00
sayli karnik 7d359a847c staging: ks7010: Remove unnecessary variable used to store return value
This patch removes an unnecessary variable used to store return values
in order to reduce memory usage.
Done using coccinelle:
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
return
- ret
+ C
;

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:48 +02:00
Rehas Sachdeva efb35d12b3 staging: octeon-usb: Remove unnecessary assignment
Remove 'x=a;' from a consecutive double assignment of the form 'x=a; x=b;'.
Issue detected by the semantic patch found here:
https://github.com/coccinelle/coccinellery/blob/master/write2/write2.cocci

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:48 +02:00
Yannis Damigos 63e6464b62 Staging:rtl8188eu: Fix multiple blank lines
This patch fixes multiple black lines issue found by checkpatch.pl

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:48 +02:00
Rehas Sachdeva 837b655553 staging: sm750fb: Remove unnecessary parentheses
Remove unnecessary parentheses from right side of an assignment. Issue
detected by the following Coccinelle semantic patch:

@r@
identifier x;
expression e1, e2;
@@

- x = (e1 << e2);
+ x = e1 << e2;

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:48 +02:00
Rehas Sachdeva f3151e0043 staging: sm750fb: Use BIT(x) macro
Replaces left shift operation (1 << d) by BIT(x) macro.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:48 +02:00
Rehas Sachdeva cf5d327367 staging: xgifb: Remove unused variable and if statement
Setting the variable 'refresh_rate = 60;' has no use to the rest of the
function. Hence the if statement setting it and the variable itself can be
removed. This was detected using the following Coccinelle semantic patch:

@@
type T;
identifier i;
constant C;
@@
(
extern T i;
|
- T i;
  <+... when != i
- i = C;
  ...+>
)

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
Katie Dunne 3adc4aae0e staging: speakup: Remove unnecessary parentheses
Issue found by checkpatch.

Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
David Lin 8d904fe50e staging: greybus: add maintainer for uart and log protocol drivers
Add myself as greybus uart and log protocol driver maintainer.

Signed-off-by: David Lin <dtwlin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
Chaehyun Lim 319b78c3c4 staging: greybus: uart.c: fix alignment to match open parenthesis
Fixes checkpatch.pl warning:
CHECK: Alignment should match open parenthesis

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
Chaehyun Lim 26746a3603 staging: greybus: uart.c: change 'unsigned' to 'unsigned int'
Fixes checkpatch.pl warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
Richard Groux 3311157455 staging: greybus: audio_codec.c: code indent should use tabs where possible
Minor error spotted by checkpatch.pl in greybus
code indent should use tabs where possible

Signed-off-by: Richard Groux <rgroux@sauron-mordor.net>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
Richard Groux 0c8d9c73e6 staging: greybus: audio_codec.c: space required before the open brace
Minor error spotted by checkpatch.pl in greybus
space required before the open brace '{'

Signed-off-by: Richard Groux <rgroux@sauron-mordor.net>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
Eva Rachel Retuya 5a420d15d1 staging: greybus: arche-platform: compress return logic into one line
Modify return statement to use the value being returned directly instead of
assigning it first to 'ret' and returning this variable. Coccinelle semantic
patch used:

@@
expression e;
local idexpression ret;
@@

-ret =
+return
	e;
-return ret;

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
Eva Rachel Retuya 4f1cbe2a7b staging: greybus: audio: delete unnecessary parentheses
Eliminate unneeded parentheses around the right hand side of an assignment.
Coccinelle semantic patch used:

@@
expression e1, e2;
identifier v;
@@

(
 v = (e1 == e2)
|
 v = (e1 != e2)
|
 v = (e1 <= e2)
|
 v = (e1 >= e2)
|
 v =
- (
	e1
- )
)

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
Eva Rachel Retuya ce35e9be62 staging: greybus: camera: simplify NULL test
Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency.
Coccinelle semantic patch used:

@@
identifier func;
expression x;
statement Z;
@@

x = func(...);

if (
(
+	!
	x
-	== NULL
|
+	!
-	NULL ==
	x
)
   ) Z

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
Andrey Shvetsov 0540609fe2 staging: most: replace MOST_CH_ISOC_AVP with MOST_CH_ISOC
This patch replaces the enum value MOST_CH_ISOC_AVP with the more
appropriate MOST_CH_ISOC.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
Christian Gromm 95f73013ed staging: most: clean up configuration strings
This patch adds the strings 'rx', 'tx' and 'isoc' to the list of accepted
identifiers when setting up a channel configuration. To keep consistency it
removes the prefix "dir_" from strings returned by the attributes
set_direction and available_directions and it removes the suffix "_avp"
from the string "isoc_avp" returned by the attributes set_datatype and
available_datatypes.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
Andrey Shvetsov 22ff195b5a staging: most: core: remove trailing zero from text property
This patch removes trailing zeros from the strings returned by the
attributes available_datatypes and available_directions.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:46 +02:00
Christian Gromm a6f9d846cc staging: most: make function most_submit_mbo return void
Function most_submit_mbo() causes an exception only if either the pointer
mbo or mbo->context equals NULL. From the underlying architecture's point
of view both cases must _not_ come true and would happen only, if something
has tampered with the pointers. This would render runtime code unable to
recover anyway. So, instead trying to hide that things are already
critically out of control we're better off with a WARN_ON() assertion.

This patch replaces the return type of the function most_submit_mbo() with
'void' and adds a WARN_ONCE() assertion. Additionally, code calling the
function is adapted accordingly.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:46 +02:00
Juliana Rodrigues 95842bc9fd staging: wlan-ng: fixed block comment formatting
This patch fixes a checkpatch warning in
a block comment by adapting it to the community
preferred coding style.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:46 +02:00
Juliana Rodrigues 98090a0ba7 staging: wlan-ng: fixed alignment not matching
This patch fixes a checkpatch warning by moving
arguments to the right and aligning them to their open
parenthesis.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:46 +02:00
Juliana Rodrigues 72d19e9899 staging: wlan-ng: fixed parenthesis alignment
This patch fixes a checkpatch warning by moving
arguments to the right and aligning them to the open
parenthesis above.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:46 +02:00
Juliana Rodrigues 5f0730fda8 staging: wlan-ng: fixed block comment trailing
Moved trailing */ to a new line and added * to subsequent lines on a
block comment.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:46 +02:00
Vaibhav Hiremath 92b8bd96fc staging: greybus: add maintainer for greybus platform drivers
Add Vaibhav Hiremath as a Maintainer of Greybus platform
drivers.

Signed-off-by: Vaibhav Hiremath <hvaibhav.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-21 13:21:58 +02:00