Linus Walleij [Thu, 7 Aug 2014 07:16:00 +0000 (08:16 +0100)]
iio: st_sensors: add devicetree probing support
The I2C devices that make up the STMicroelectronics MEMS sensors
may be sneakily enabled by cleverly giving the device node the same
name as a string match from the platform device ID table. However
the right method is to use the compatible string.
On detection, the ST sensors use the ID string to probe and
instatiate the right sensor driver, so pass the kernel-internal ID
string in the .data field of the OF match table, and set the I2C
client name to this name when a compatible match is used.
This avoids having misc Linux-specific strings floating around in
the device tree.
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Denis CIOCCA <denis.ciocca@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Mon, 30 Jun 2014 08:50:00 +0000 (09:50 +0100)]
staging:iio:ad7291: Move out of staging
The ad7291 driver is in a reasonable shape. It does not use non-standard API/ABI
and there are no major style issues with the driver. So this patch moves it out
of staging.
There is one small warning from checkpatch which is also fixed in this patch.
The patch also sorts the #include directives in alphabetical order.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Hartmut Knaack [Thu, 7 Aug 2014 11:06:00 +0000 (12:06 +0100)]
staging:iio:ad7291 define alert register bits
Define some names for alert register bits and apply them to
ad7291_event_handler().
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Hartmut Knaack [Thu, 7 Aug 2014 11:06:00 +0000 (12:06 +0100)]
staging:iio:ad7291 faciliate ad7291_read_event_config()
Save some lines in returning a voltage event.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Hartmut Knaack [Thu, 7 Aug 2014 11:06:00 +0000 (12:06 +0100)]
staging:iio:ad7291 cleanup defines
Use BIT and GENMASK, remove unused defines, use AD7291_VOLTAGE_OFFSET
definition and move AD7291_BITS.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Hartmut Knaack [Thu, 7 Aug 2014 11:06:00 +0000 (12:06 +0100)]
staging:iio:ad7291 fix coding style
Fix indention and comment style.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Hartmut Knaack [Thu, 7 Aug 2014 11:06:00 +0000 (12:06 +0100)]
staging:iio:ad7291 remove double define
Remove second instance of definition of AD7291_BITS.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Himangi Saraogi [Tue, 7 Jan 2014 22:19:00 +0000 (22:19 +0000)]
iio:trigger: Introduce the use of devm_kzalloc
This patch introduces the use of the managed version of kzalloc and
removes the kfrees in the probe and remove functions. More return
paths are added and the labels are renamed to order them.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Himangi Saraogi [Tue, 7 Jan 2014 19:44:00 +0000 (19:44 +0000)]
staging: iio: Introduce the use of devm_ioremap_resource
This patch introduces the use of devm_ioremap_resource. It does away
with call to request_mem_region and the error checking on
platform_get_resource. Also, the calls to free the allocated resources
like release_mem_region and iounmap are done away with. The ret variable
in the probe function is also eliminated. Also, a bug is fixed as the
goto in the error handling of request_mem_region should not have
called release_mem_region which releases a resource that has not been
allocated.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Daniel Baluta [Mon, 7 Jul 2014 14:12:00 +0000 (15:12 +0100)]
staging: iio: remove duplicate case labels
Otherwise, compiling iio_event_monitor program fails:
io_event_monitor.c: In function ‘event_is_known’:
iio_event_monitor.c:125:2: error: duplicate case value
case IIO_MOD_LIGHT_BOTH:
^
iio_event_monitor.c:121:2: error: previously used here
case IIO_MOD_LIGHT_BOTH:
Fixes: da4db94 (iio staging: add recently added modifiers to iio_event_monitor)
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Fri, 7 Mar 2014 12:56:00 +0000 (12:56 +0000)]
staging: iio: ad9832: Remove redundant check
'val' is unsigned and cannot be negative.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Daniel Baluta [Mon, 30 Jun 2014 09:29:00 +0000 (10:29 +0100)]
iio: hid-sensors: make hid_sensor_get_reporting_interval static
This fixes the following sparse warning:
CHECK drivers/iio/common/hid-sensors/hid-sensor-attributes.c
drivers/iio/common/hid-sensors/hid-sensor-attributes.c:346:5: warning:
symbol 'hid_sensor_get_reporting_interval' was not declared. Should it be static?
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Linus Walleij [Mon, 7 Jul 2014 09:48:00 +0000 (10:48 +0100)]
iio: st_sensors: add device tree bindings
This adds some basic, simple device tree bindings to the STMicro
MEMS sensor drivers.
Cc: devicetree@vger.kernel.org
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Denis CIOCCA <denis.ciocca@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Linus Walleij [Mon, 7 Jul 2014 09:47:00 +0000 (10:47 +0100)]
iio: st_sensors: get platform data from device tree
Currently the STMicroelectronics sensors only support one single
platform data item: configuration of the DRDY (data ready) pin
for a particular design. Augment the core to prioritize and take
this information from the device tree if the parent device has an
assigned device node, else fall back to passed in platform data
(usually the default data).
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Denis CIOCCA <denis.ciocca@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Jonathan Cameron [Sun, 22 Jun 2014 19:59:00 +0000 (20:59 +0100)]
iio: imu: adis16480 switch sampling frequency attr to core support
By using the info_mask_shared_by_all element of the channel spec, access
to the sampling frequency becomes available to in kernel users of the
driver. It also shortens and simplifies the code.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Jonathan Cameron [Sun, 22 Jun 2014 19:59:00 +0000 (20:59 +0100)]
iio: imu: adis16400 switch sampling frequency attr to core support.
By using the info_mask_shared_by_all element of the channel spec, access
to the sampling frequency becomes available to in kernel users of the
driver. It also shortens and simplifies the code.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Jonathan Cameron [Sun, 22 Jun 2014 19:59:00 +0000 (20:59 +0100)]
iio: adis: Switch sampling frequency attr to core support.
By using the info_mask_shared_by_all element of the channel spec, acce
to the sampling frequency becomes available to in kernel users of the
driver. It also shortens and simplifies the code.
This particular conversion was made more complicated by the shared library
and the fact that a number of the drivers do not actually have support for
setting or reading the sampling frequency. The hardware, in those cases
investigated supports it. It's just never been implemented.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Jonathan Cameron [Sun, 22 Jun 2014 19:59:00 +0000 (20:59 +0100)]
iio: gyro: itg3200 switch sampling frequency attr to core support.
By using the info_mask_shared_by_all element of the channel spec, access
to the sampling frequency becomes available to in kernel users of the
driver. It also shortens and simplifies the code a little.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Cc: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Cc: Thorsten Nowak <thorsten.nowak@iis.fraunhofer.de>
Cc: Christian Strobel <christian.strobel@iis.fraunhofer.de>
Jonathan Cameron [Sun, 22 Jun 2014 19:59:00 +0000 (20:59 +0100)]
iio:st sensors: remove custom sampling frequence attribute in favour of core support.
This allows in kernel client drivers to access this
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Denis Ciocca <denis.ciocca@st.com>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Peter Meerwald [Wed, 7 May 2014 12:38:00 +0000 (13:38 +0100)]
iio: Add driver for AMS/TAOS tcs3414 digital color sensor
16-bit digital color sensor with red, green, blue and clear channel
datasheet: http://ams.com/eng/content/download/250258/975997/TCS3414_Datasheet_EN_v1.pdf
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Wed, 7 May 2014 12:38:00 +0000 (13:38 +0100)]
iio: Add Intersil isl29125 digital color light sensor driver
datasheet: http://www.intersil.com/content/dam/Intersil/documents/isl2/isl29125.pdf
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Fri, 7 Mar 2014 07:44:00 +0000 (07:44 +0000)]
iio: hid-sensors: Fix compilation warning
Move the 'static' keyword to beginning of definition to silence the
following compilation warning:
drivers/iio/common/hid-sensors/hid-sensor-attributes.c:34:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Fri, 7 Mar 2014 07:38:00 +0000 (07:38 +0000)]
iio: xilinx-xadc: Remove unused variable
'offset’ is not used in the function. Remove it.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Fri, 7 Mar 2014 07:38:00 +0000 (07:38 +0000)]
iio: ad5686: Remove redundant variable
‘regdone’ is not used in the function. Remove it.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Fri, 7 Mar 2014 07:38:00 +0000 (07:38 +0000)]
iio: ad5504: Remove redundant variable
By re-arranging the code, 'ret' can be removed from this
function.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Fri, 7 Mar 2014 07:38:00 +0000 (07:38 +0000)]
iio: ad5624r_spi: Remove redundant variable
By re-arranging the code, 'ret' can be removed from this
function.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Fri, 7 Mar 2014 07:38:00 +0000 (07:38 +0000)]
iio: adis16400: Remove unused variable
'rx' is not used in this function. Remove it.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Kristina Martšenko [Tue, 1 Jul 2014 15:54:43 +0000 (18:54 +0300)]
staging: cxt1e1: remove driver
Remove the driver as it hasn't been cleaned up and it doesn't look like
anyone is going to work on it anymore. This can be reverted if someone
wants to work to fix the remaining issues the driver has.
Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Bob Beers <bob.beers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kristina Martšenko [Mon, 30 Jun 2014 23:14:02 +0000 (02:14 +0300)]
staging: dgrp: remove driver
Remove the driver as it hasn't been cleaned up and it doesn't look like
anyone is going to work on it anymore. This can be reverted if someone
wants to work to fix the remaining issues the driver has.
Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Bill Pemberton <wfp5p@worldbroken.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kristina Martšenko [Mon, 30 Jun 2014 21:50:55 +0000 (00:50 +0300)]
staging: serqt_usb2: remove driver
Remove the driver as it hasn't been cleaned up and it doesn't look like
anyone is going to work on it anymore. This can be reverted if someone
wants to work to fix the remaining issues the driver has.
Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kristina Martšenko [Mon, 30 Jun 2014 19:16:55 +0000 (22:16 +0300)]
staging: wlags49_h2(5): remove driver
Remove the driver as it hasn't been cleaned up and it doesn't look like
anyone is going to work on it anymore.
Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Henk de Groot <pe1dnn@amsat.org>
Cc: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ben Chan [Sat, 28 Jun 2014 06:17:27 +0000 (23:17 -0700)]
staging: gdm72xx: use lower case for variable names for consistency
Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ben Chan [Sat, 28 Jun 2014 06:17:26 +0000 (23:17 -0700)]
staging: gdm72xx: use int instead of u32 whenever makes sense
This patch addresses the following issues:
- Use int instead of u32 whenever makes sense
- Turn extract_qos_list() in gdm_qos.c, which previously always returned
0, into a void function.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Michalis Pappas <mpappas@fastmail.fm>
Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ben Chan [Sat, 28 Jun 2014 06:17:25 +0000 (23:17 -0700)]
staging: gdm72xx: use bool instead of custom-defined BOOLEAN
Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ben Chan [Sat, 28 Jun 2014 06:17:24 +0000 (23:17 -0700)]
staging: gdm72xx: return -EINVAL instead of BUG_ON for invalid data length
This patch changes gdm_usb_send() and gdm_sdio_send() to return -EINVAL instead
of calling BUG_ON if an invalid data length is passed to the functions.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Michalis Pappas <mpappas@fastmail.fm>
Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Guillaume Morin [Sat, 28 Jun 2014 16:16:40 +0000 (18:16 +0200)]
staging: dgnc_driver.c: code style fixes
Simple code style fixes:
- "if(" -> "if ("
- "switch(" -> "switch ("
- move one open brace to the line of the declaration instead of
its own line
- remove trailing whitespace
Signed-off-by: Guillaume Morin <guillaume@morinfr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Morgan S. Stuart [Sat, 28 Jun 2014 13:16:52 +0000 (09:16 -0400)]
Staging: rtl8192ee: fixed tab coding style issue in base.h
Fixes the tab error found in base.h, reported by checkpatch.pl tool
Signed-off-by: Morgan Stuart <morgansstuartdev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fabian Frederick [Sat, 28 Jun 2014 11:22:59 +0000 (13:22 +0200)]
drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c: remove unnecessary null test before kfree
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cheng-Wei Lee [Fri, 27 Jun 2014 11:42:14 +0000 (19:42 +0800)]
staging: wlan-ng/hfa384x_usb.c: add blank line after declarations
This patch fixes the following checkpatch.pl issues in hfa384x_usb.c:
WARNING: Missing a blank line after declarations
Signed-off-by: Quentin Lee <lee.rhapsody@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anil Belur [Sat, 28 Jun 2014 15:56:16 +0000 (21:26 +0530)]
staging: lustre: lnet: api-ni.c: fixed sparse warnings
- this fixes few sparse warnings for missing static in functions:
drivers/staging/lustre/lnet/lnet/api-ni.c:63:6: warning: symbol 'lnet_get_routes' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:69:6: warning: symbol 'lnet_get_networks' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:93:1: warning: symbol 'lnet_init_locks' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:102:1: warning: symbol 'lnet_fini_locks' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:180:6: warning: symbol 'lnet_assert_wire_constants' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:273:7: warning: symbol 'lnet_find_lnd_by_type' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:419:1: warning: symbol 'lnet_create_interface_cookie' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:450:1: warning: symbol 'lnet_res_container_cleanup' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:494:1: warning: symbol 'lnet_res_container_setup' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:612:1: warning: symbol 'lnet_prepare' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:917:1: warning: symbol 'lnet_shutdown_lndnis' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:1034:1: warning: symbol 'lnet_startup_lndnis' was not declared. Should it be static?
Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sami Laine [Fri, 27 Jun 2014 13:14:16 +0000 (16:14 +0300)]
drivers/staging/lustre/lustre/llite: sparse warning corrections
Sparse warning corrections: NULL-pointers as NULL instead of static 0's.
Signed-off-by: Sami Laine <laine.j.sami@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Fri, 27 Jun 2014 09:55:17 +0000 (11:55 +0200)]
Staging: bcm: Lines shortened in download_ddr_settings()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Fri, 27 Jun 2014 09:55:16 +0000 (11:55 +0200)]
Staging: bcm: Lines shortened in ddr_init()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Fri, 27 Jun 2014 09:55:15 +0000 (11:55 +0200)]
Staging: bcm: Moved doubled if-block
This patch moves the doubled if block inside the retval-checking one
level up.
As the if-else-block it was in is now a one-statement if-else block,
I removed the braces from it.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Fri, 27 Jun 2014 09:55:14 +0000 (11:55 +0200)]
Staging: bcm: Fixed indention for inner if-block
The inner if-statement was aligned just like the outer one. Why?
This indention was introduced by
f34c488c3894968e8cdbdc3b1ed617d78315cace
which is a indention-fix patch itself. That's why I'm curious about it.
I did not merge these nested if-statements, as I don't know if I'm
destroying logical seperated checks with it.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Fri, 27 Jun 2014 09:55:13 +0000 (11:55 +0200)]
Staging: bcm: Indentation fixes
This patch fixes some indentation errors, where multi-line statements
where not indented.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Fri, 27 Jun 2014 09:55:12 +0000 (11:55 +0200)]
Staging: bcm: Misc whitespace fixes
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sat, 28 Jun 2014 22:55:46 +0000 (23:55 +0100)]
staging: vt6656: device_init_registers move out vnt_set_bss_mode
Move to vnt_add_interface and allow to refresh at the start
of every software scan in vnt_sw_scan_start
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sat, 28 Jun 2014 22:55:45 +0000 (23:55 +0100)]
staging: vt6656: set BBvSetVGAGainOffset inside vnt_set_bss_mode
vnt_set_bss_mode changes the state of abyBBVGA so move
BBvSetVGAGainOffset to the function.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sat, 28 Jun 2014 22:55:44 +0000 (23:55 +0100)]
staging: vt6656: remove vnt_add_basic_rate
The driver never sets basic rate any more so remove function.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sat, 28 Jun 2014 22:55:43 +0000 (23:55 +0100)]
staging: vt6656: dead code remove RXvWorkItem and RXvFreeRCB
Remove work_struct and queue variables
Remove EnqueueRCB and DequeueRCB macros
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sat, 28 Jun 2014 22:55:42 +0000 (23:55 +0100)]
staging: vt6656: Remove rx handing from RXvWorkItem
In s_nsBulkInUsbIoCompleteRead reuse or reallocate sb_buff and resubmit
urb.
In device_alloc_bufs allocate memory to rcb individually and
call PIPEnsBulkInUsbRead to submit the urbs
Change handling to free rcb in device_free_rx_bufs
Remove calls to workqueue.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sat, 28 Jun 2014 22:55:41 +0000 (23:55 +0100)]
staging: vt6656: vnt_tx_packet remove first assignment of time_stamp.
This is assigned later in function and should have been removed in
an out-of-tree merge.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sat, 28 Jun 2014 22:55:40 +0000 (23:55 +0100)]
staging: vt6656: rxtx replace wFragCtl with frag_ctl.
Use base type to __le16 and do endian correction.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sat, 28 Jun 2014 22:55:39 +0000 (23:55 +0100)]
staging: vt6656: rxtx struct vnt_mic_hdr change tsc_47_16/tsc_15_0
Replace with ccmp_pn with size of IEEE80211_CCMP_PN_LEN(6)
memcpy the struct ieee80211_key_seq -> ccmp.pn onto ccmp_pn
removing the need for endian conversion.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:35 +0000 (11:10 -0700)]
staging: comedi: mite: cleanup mite_unsetup()
This function is only called by comedi drivers during the (*detach) of the
driver. After it is called mite_free() is always called to kfree the allocated
mite_struct pointer.
Rename this function to mite_detach() and merge the kfree() from mite_free()
into it.
Remove the unnecessary clearing of the mite variables since the mite pointer
is going to be kfree()'d anyway.
The mite_detach() function checks if the pointer is valid so remove the
unnecessary checks in the callers.
The check can also be removed in ni_660x since the ni_660x_free_mite_rings()
function does not actually need the 'mite' pointer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:34 +0000 (11:10 -0700)]
staging: comedi: mite.h: remove mite_device()
This inline function is not used. Just remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:33 +0000 (11:10 -0700)]
staging: comedi: mite.h: remove mite_irq()
This inline function simply returns the 'irq' of the struct pci_dev pointer
that is stored in struct mite_struct. This pci_dev pointer is the same as
the one that is already available in the (*auto_attach) functions where
mite_irq() is used.
Use the pci_dev pointer directly to get the irq and remove the unnecessary
inline function to remove the indirection.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:32 +0000 (11:10 -0700)]
staging: comedi: ni_pcimio: remove ATMIO and PCIMIO defines
These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.
Regardless, the symbols are not used. Just remove them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:31 +0000 (11:10 -0700)]
staging: comedi: ni_mio_cs: remove ATMIO and PCIMIO defines
These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.
Regardless, the symbols are not used. Just remove them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:30 +0000 (11:10 -0700)]
staging: comedi: ni_atmio: remove ATMIO and PCIMIO defines
These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.
Regardless, the symbols are not used. Just remove them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:29 +0000 (11:10 -0700)]
staging: comedi: ni_pcimio: remove DRV_NAME define
This define is not used ny the driver. Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Thu, 26 Jun 2014 17:13:08 +0000 (10:13 -0700)]
staging: comedi: ni_stc.h: the boardinfo 'name' should be first
By convention, the first member of the boardinfo is a 'const char *' to
the board name, especially for those comedi drivers that rely on the
comedi core to set dev->board_ptr to the entry matching the board name
when doing a legacy (*attach) to a comedi driver.
Modify the ni_board_struct appropriately for consistency, although the
board name is only used for informational purposes by this driver (only
the driver name is matched by the comedi core).
For aesthetics, also move the members in the boardinfo declarations.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:27 +0000 (11:10 -0700)]
staging: comedi: ni_atmio: tidy up the boardinfo
For aesthetics, add some whitespace to the boardinfo declaration.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:26 +0000 (11:10 -0700)]
staging: comedi: ni_mio_cs: remove NI_SIZE define
This define is not used by the driver. Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:25 +0000 (11:10 -0700)]
staging: comedi: ni_atmio: remove NI_SIZE define
This define is only used in the comedi_request_region() to specify the
size of the region. Remove the define and just open code the value.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:24 +0000 (11:10 -0700)]
staging: comedi: ni_atmio: remove '= 0' boardinfo data
Remove all the boardinfo data the is set to '0'. They will default
to that when the boardinfo is declared.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:23 +0000 (11:10 -0700)]
staging: comedi: ni_mio_common.c: remove IRQ_POLARITY defines
Pass the irq_polarity to ni_E_init() and remove the defines.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:22 +0000 (11:10 -0700)]
staging: comedi: ni_mio_common drivers: remove NI_E_IRQ_FLAGS defines
These defines are only used in the request_irq() calls. Remove them
and just open code the values.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:21 +0000 (11:10 -0700)]
staging: comedi: ni_mio_common.c: remove interrupt_pin() macros
Pass the 'interrupt_pin' to ni_E_init() and remove the macros.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 20 Jun 2014 18:10:20 +0000 (11:10 -0700)]
staging: comedi: ni_pcimio: remove forward declarations
Move some functions to avoid the need for the forward declarations.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Sun, 29 Jun 2014 16:49:28 +0000 (09:49 -0700)]
Merge tag 'iio-for-3.17b' of git://git./linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Second round of new drivers and cleanups for IIO in the 3.17 cycle.
New drivers
* mcp4902, mcp4912 and mcp4922 SPI DAC driver.
* max1027, max1029 and max1031 SPI ADC driver.
Cleanups
* cm32181 - use devm APIs to simplify error paths.
* ak8975 - use devm APIs to simplify error paths.
* ad9850 - drop some unused defines and an unnecessary goto.
* hmc5843 - add missing devices to the device id table and the documentation.
* ad9832 - small formatting cleanups.
* sca3000 - hide direct use of the stufftoread element by adding a
data_available function. This is a precursor for the addition of buffer
watermarks to the subsystem but stands as a good cleanup on its own.
Josselin Costanzi [Fri, 27 Jun 2014 16:20:00 +0000 (17:20 +0100)]
iio: staging: sca3000: hide stufftoread logic
Change sca3000_ring implementation so that it exports a data_available
function to iio.
Signed-off-by: Josselin Costanzi <josselin.costanzi@mobile-devices.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Federico Di Pierro [Sun, 29 Jun 2014 09:41:00 +0000 (10:41 +0100)]
staging: iio: Coding style issues fix.
Fix some little style issues in drivers/staging/iio/frequency/ad9832.c .
This is my latest task of the eudyptula challenge (third attempt!)
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Beomho Seo [Mon, 23 Jun 2014 12:34:00 +0000 (13:34 +0100)]
iio: magnetometer: ak8975: Use devm_* APIs
This patch use devm_* APIs make driver simpler.
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Marek Belisko [Fri, 14 Feb 2014 14:25:00 +0000 (14:25 +0000)]
Documentation: iio: Extend documentation for hmc5843 bindings.
Signed-off-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Marek Belisko [Fri, 14 Feb 2014 14:25:00 +0000 (14:25 +0000)]
staging: iio: hmc5843: Add all available models to device tree id table.
Signed-off-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Guillaume Morin [Sat, 28 Jun 2014 15:54:00 +0000 (16:54 +0100)]
staging: iio: ad9850.c: code cleanup
checkpath.pl was complaining about value_mask:
ERROR: Macros with complex values should be enclosed in parenthesis
I fixed this by simply removing it since it's not used (as well as another
macro). Got rid of the un-necessary error_ret label as well.
Signed-off-by: Guillaume Morin <guillaume@morinfr.org>
Reported-by: Michael Welling <mwelling@ieee.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Kristina Martšenko [Sat, 28 Jun 2014 21:26:50 +0000 (00:26 +0300)]
staging: winbond: remove driver
The driver hasn't been cleaned up and nobody is working to do so, so
remove it.
Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philippe Reynes [Sat, 14 Jun 2014 22:27:00 +0000 (23:27 +0100)]
iio: add support of the max1027
This driver add partial support of the
maxim 1027/1029/1031. Differential mode is not
supported.
It was tested on armadeus apf27 board.
Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Rickard Strandqvist [Wed, 25 Jun 2014 14:38:01 +0000 (16:38 +0200)]
staging: bcm: nvm.c: Cleaning up check unsigned is less than zero
Remove checking if a unsigned int is less than zero
This was found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:50:47 +0000 (21:50 +0200)]
Staging: bcm: hostmibs.c: Shortened lines
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Jake Edge <jake@lwn.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:50:44 +0000 (21:50 +0200)]
Staging: bcm: replaced member accessing with variable for readability
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Jake Edge <jake@lwn.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:30:21 +0000 (21:30 +0200)]
Staging: bcm: Added missing blank line after declarations
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:30:20 +0000 (21:30 +0200)]
Staging: bcm: Replaced member accssing with variable
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:30:19 +0000 (21:30 +0200)]
Staging: bcm: Whitespace for indentation fixed
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:30:18 +0000 (21:30 +0200)]
Staging: bcm: line length fixed
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:25:17 +0000 (21:25 +0200)]
Staging: bcm: Line length cleanup
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:25:16 +0000 (21:25 +0200)]
Staging: bcm: Shortened some lines in select_alternate_setting_for_highspeed_modem()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:25:15 +0000 (21:25 +0200)]
Staging: bcm: Outsourced selecting of alternate setting
This patch outsources a chunk of code which is for selecting an
alternate setting for highspeed modem into a new function.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:25:14 +0000 (21:25 +0200)]
Staging: bcm: Merged some lines which got shorter by the latest patch
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:25:13 +0000 (21:25 +0200)]
Staging: bcm: Replaced member accessing with variable in InterfaceAdapterInit()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:25:12 +0000 (21:25 +0200)]
Staging: bcm: Replaced member accessing with variable in device_run()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:25:11 +0000 (21:25 +0200)]
Staging: bcm: replaced member accessing by variable
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:25:10 +0000 (21:25 +0200)]
Staging: bcm: Shortened some lines
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:18:31 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Replaced nested ifs with logical AND concatenation
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:18:30 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Replaced member accessing by variable
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:18:29 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Replaced member accessing by variable
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:18:28 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Replaced doubled if-check by logical OR in one check
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Mon, 23 Jun 2014 19:18:27 +0000 (21:18 +0200)]
Staging: bcm: led_control.c: Replaced time selecting ifelse with ternary operator
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>