This is not implemented and doesn't really make sense because IIO
proximity is unit-less.
Remove IIO_CHAN_INFO_SCALE from info_mask because so that the _scale
sysfs entry won't appear. This fixes userspace tools like generic_buffer
which abort when reads returns an error.
Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Alison Schofield [Fri, 20 May 2016 17:06:41 +0000 (10:06 -0700)]
iio: humidity: hdc100x: correct humidity integration time mask
Apply the correct mask to enable all available humidity integration
times. Currently, the driver defaults to 6500 and all is okay with that.
However, if 3850 is selected we get a stuck bit and can't change back
to 6500 or select 2500. (Verified with HDC1008)
Signed-off-by: Alison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Matt Ranostay <mranostay@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Akinobu Mita [Thu, 28 Apr 2016 14:39:53 +0000 (23:39 +0900)]
iio: pressure: bmp280: fix error message for wrong chip id
The bmp280 driver also supports BMP180 which has a different chip id
with BMP280. The probe routine verifies that the device reports the
correct chip id but the error message is confusing as if BMP280's chip
id is always expected.
Reported-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Matt Ranostay <mranostay@gmail.com> Cc: Vlad Dogaru <vlad.dogaru@intel.com> Cc: Christoph Mair <christoph.mair@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
When writing a value using direct reg access from debugfs
we need to return and not fall through to reading the
value, lest we'll dereference a NULL pointer.
Cc: Dan Carpenter <dan.carpenter@oracle.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Daniel Baluta [Fri, 29 Apr 2016 11:42:34 +0000 (14:42 +0300)]
iio: bmi160: Fix ODR setting
mask and val parameters of regmap_update_bits were reveresed.
Fixes: 77c4ad2d6a9 ("iio: imu: Add initial support for Bosch BMI160") Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Daniel Baluta [Fri, 29 Apr 2016 11:42:33 +0000 (14:42 +0300)]
iio: bmi160: Fix output data rate for accel
Format is INT_PLUS_MICRO and micro odr part of ODR should
be parts of a micro.
Also s/8000/800 this is obviously a typo.
Fixes: 77c4ad2d6a9 ("iio: imu: Add initial support for Bosch BMI160") Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
staging: comedi: mite: tidy up mite dma channel request/release
For aesthetics, make the actual "request" function static and change
mite_request_channel_in_range() into a wrapper that calls the internal
function. Change the inline function that requests any free channel
into an export that also calls the internal function.
Move the functions to a more logical spot in the code and add docbook
comments for the exported functions.
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>
staging: comedi: mite: remove mite member 'channel_allocated'
An allocated mite_channel will have its 'ring' member initialized
to point to the mite_ring that will be used for DMA. A non-allocated
mite_channel will have a 'ring' member set to NULL, either by a
channel release or due to the initial kzalloc of the 'mite' struct.
Refactor the code to use the mite_chan->ring to detect in a channel
is allocated and remove the unnecessary member.
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>
Chaehyun Lim [Mon, 2 May 2016 10:47:55 +0000 (19:47 +0900)]
staging: wilc1000: rename result in handle_get_mac_address
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.
Chaehyun Lim [Mon, 2 May 2016 10:47:54 +0000 (19:47 +0900)]
staging: wilc1000: change data type of result in handle_get_mac_address
This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.
Chaehyun Lim [Mon, 2 May 2016 10:47:53 +0000 (19:47 +0900)]
staging: wilc1000: change handle_get_mac_address's return type to void
When handle_get_mac_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due to have
a single statement.
Chaehyun Lim [Mon, 2 May 2016 10:47:51 +0000 (19:47 +0900)]
staging: wilc1000: rename result in handle_get_ip_address
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.
Chaehyun Lim [Mon, 2 May 2016 10:47:50 +0000 (19:47 +0900)]
staging: wilc1000: change data type of result in handle_get_ip_address
This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.
Chaehyun Lim [Mon, 2 May 2016 10:47:49 +0000 (19:47 +0900)]
staging: wilc1000: change handle_get_ip_address's return type to void
When handle_get_ip_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due to have
a single statement.
When updating the irq_chip and msi_domain_ops, the code checkes for
already present functions.
When more then one ITS controller are present in the system,
irq_chip and msi_domain_ops got already set and a warning is invoked.
This patch deletes the warning, as the funtions are just already set to
the needed callbacks.
staging: fsl-mc: add quirk handling for dpseci objects < 4.0
dpseci objects < 4.0 are not coherent-- in spite of the fact
that the MC reports them to be coherent in certain versions.
Add a special case to set the no shareability flag for dpseci
objects < 4.0.
Signed-off-by: Horia Geanta <horia.geanta@nxp.com>
(Stuart: reworded commit message, updated comment in patch) Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com> Acked-by: German Rivera <german.rivera@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: fsl-mc: get version of root dprc from MC hardware
The root dprc is discovered as a platform device in the device tree. The
version of that dprc was previously set using hardcoded values from the API
header in the kernel). This patch removes the use of the hardcoded version
numbers and instead reads the actual dprc version from the hardware.
staging: fsl-mc: don't use object versions to make binding decisions
Up until now if the object version expected by a driver (in the API header
file) did not match the actual object version in the MC hardware the bus
driver refused to bind the object to the driver or printed out WARN_ON
dumps.
This patch removes those checks, and the responsibility of object version
checking should now be done in the object drivers themselves. If the actual
version discovered is not supported, the driver's probe function should fail.
Drivers should use version checks to support new features and provide
backwards compatibility if at all possible.
This patch also removes the checks that caused bus driver probing to fail
if the overall MC version discovered did not match the firmware version
from the API header...this was too strict. The overall MC version is
informational like a release number, and continues to be printed in the
boot log.
Signed-off-by: Itai Katz <itai.katz@nxp.com>
(Stuart: reworded commit log) Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com> Acked-by: German Rivera <german.rivera@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Fri, 8 Apr 2016 13:02:35 +0000 (16:02 +0300)]
staging: lowmemorykiller: remove bogus NULL check
The NULL checking here doesn't make sense, so it causes a static checker
warning. It turns out that p->mm can't be NULL so the inconsistency is
harmless and we should just remove the check.
staging: fsl-mc: get rid of mutex_locked variables
Remove mutex_locked variables which are used to determine whether mutex is
locked, instead add another label to unlock mutex on premature exits due to
an error.
This patch also addresses the folowing warnings reported by coccinelle:
drivers/staging/fsl-mc/bus/mc-allocator.c:237:1-7: preceding lock on line 204
drivers/staging/fsl-mc/bus/mc-allocator.c:89:1-7: preceding lock on line 57
drivers/staging/fsl-mc/bus/mc-allocator.c:157:1-7: preceding lock on line 124
Nicholas Sim [Tue, 5 Apr 2016 16:21:32 +0000 (17:21 +0100)]
staging: rtl8192u: rewrite NULL comparison for pointers
When testing pointers, it is not necessary to explicitly compare to
NULL. Rewrite if condition as (!ptr) or (ptr) as suggested in
Documentation/CodingStyle
Signed-off-by: Nicholas Sim <nicholassimws@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Manu Kumar [Mon, 4 Apr 2016 23:53:01 +0000 (16:53 -0700)]
staging: skein: cleanup: add operator white space
Added white space between operators and operands. Because this sometimes
maxed out the column width, some expressions were broken up into multiple
lines, and comments were moved appropriately.
Signed-off-by: Manu Kumar <maraku@gmx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc: Added spaces around a bitwise OR.
Coding rules request placing bitwise OR operators between empty spaces
for better readibility. This patch applies this format to a line in
dgnc_tty.c file.
Signed-off-by: Juanma de Hoyos <juanmahv@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: wlan-ng: memory allocated inside mkimage() is not freed if subsequent calls fails.
This patch frees memory allocated inside mkimage() in case mkimage()
or any other subsequent calls inside prism2_fwapply() from prism2fw.c
file fails. To fix this I introduces goto labels where the free
operation is done in case some operations fails. After the introduction
of goto labels has been done, in order to use the same return path,
"return x" instuctions were replaced with "goto" instuctions.
Markus Böhme [Wed, 6 Apr 2016 21:53:39 +0000 (23:53 +0200)]
staging: android: ion: make locally used functions static
Functions ion_handle_put and ion_handle_get_by_id are only used locally
in ion.c, so they should be made static as they used to be before 9590232b ("staging/android/ion : fix a race condition in the ion driver").
Signed-off-by: Markus Böhme <markus.boehme@mailbox.org> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Reviewed-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>