Andrey Shvetsov [Tue, 25 Oct 2016 15:44:21 +0000 (17:44 +0200)]
staging: most: hdm-usb: introduce synchronization function
This patch introduces the function start_sync_ep() and relocates the
triggers for synchronization to this function.
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>
Andrey Shvetsov [Tue, 25 Oct 2016 15:44:20 +0000 (17:44 +0200)]
staging: most: hdm-usb: do h/w specific synchronization at configuration time
This patch puts the synchronization procedure trigger for asynchronous
channels into the function hdm_configure_channel. Likewise, it removes
triggering of hardware specific synchronization for other channel types
from the probe function as it is not required.
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>
Andrey Shvetsov [Tue, 25 Oct 2016 15:44:19 +0000 (17:44 +0200)]
staging: most: aim-networking: keep channels closed if ndo_open fails
This patch stops all started channels whenever the function most_nd_open
returns an error. Additionally, it renames variable wait_res to ret for
the consistency.
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>
Leo Sperling [Sun, 23 Oct 2016 12:02:23 +0000 (14:02 +0200)]
Staging: media: davinci_vpfe: fix indentation issue in vpfe_video.c
This is a patch to the vpfe_video.c file that fixes an indentation
warning reported by checkpatch.pl
Signed-off-by: Leo Sperling <leosperling97@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 24 Oct 2016 15:22:01 +0000 (17:22 +0200)]
staging: iio: ad5933: avoid uninitialized variable in error case
The ad5933_i2c_read function returns an error code to indicate
whether it could read data or not. However ad5933_work() ignores
this return code and just accesses the data unconditionally,
which gets detected by gcc as a possible bug:
drivers/staging/iio/impedance-analyzer/ad5933.c: In function 'ad5933_work':
drivers/staging/iio/impedance-analyzer/ad5933.c:649:16: warning: 'status' may be used uninitialized in this function [-Wmaybe-uninitialized]
This adds minimal error handling so we only evaluate the
data if it was correctly read.
Link: https://patchwork.kernel.org/patch/8110281/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pierre-Yves Kerbrat [Wed, 19 Oct 2016 18:49:53 +0000 (20:49 +0200)]
staging: rtl8188eu: os_dep: remove unnecessary alloc fail message
Remove redundant alloc fail message
This patch fixes the warning found by checkpatch
Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pierre-Yves Kerbrat [Wed, 19 Oct 2016 18:49:52 +0000 (20:49 +0200)]
staging: rtl8188eu: os_dep: remove unnecessary parentheses
Remove parentheses in _rtw_init_queue to fix checkpatch warning
Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pierre-Yves Kerbrat [Wed, 19 Oct 2016 18:49:51 +0000 (20:49 +0200)]
staging: rtl8188eu: os_dep: fix missing spaces around operators
Fix missing space around operators in rtw_alloc2d function in
osdep_service.c
Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pierre-Yves Kerbrat [Wed, 19 Oct 2016 18:49:50 +0000 (20:49 +0200)]
staging: rtl8188eu: os_dep: fix block comment alignment issue
Fix coding style issue in block comment in osdep_service.c found by
checkpatch tool
Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pierre-Yves Kerbrat [Wed, 19 Oct 2016 18:49:49 +0000 (20:49 +0200)]
staging: rtl8188eu: os_dep: remove empty lines
Remove unnecessary empty lines (issue found by checkpatch)
Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eric S. Stone [Sun, 23 Oct 2016 02:51:29 +0000 (19:51 -0700)]
staging: sm750fb: restructure multi-line comments to follow CodingStyle
Eliminates all checkpatch.pl BLOCK_COMMENT_STYLE warnings in
sm750fb, and coincidentally eliminates some line-length (80)
warnings.
Signed-off-by: Eric S. Stone <esstone@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alex Briskin [Sat, 22 Oct 2016 11:34:28 +0000 (14:34 +0300)]
staging:r8188eu: Remove space before comma
Trivial style fix to remove unnecessary errors in checkpatch.pl
Signed-off-by: Alex Briskin <br.shurik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nadim Almas [Fri, 21 Oct 2016 16:29:05 +0000 (21:59 +0530)]
Staging:vt6656:main_usb: fix Block comments should align the * on each line
Block comments should align the * on each line as reported by checkpatch.pl
Signed-off-by: Nadim Almas <nadim.902@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Maninder Singh [Thu, 20 Oct 2016 12:47:03 +0000 (18:17 +0530)]
Staging: xgifb: Fix NULL pointer comparison warning
Replace direct comparisons to NULL i.e.
'x == NULL' with '!x'.
This problem was detected by checkpatch.
Signed-off-by: Maninder Singh <maninder.s2@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Thu, 20 Oct 2016 09:36:30 +0000 (15:06 +0530)]
staging: wilc1000: Remove unused function wilc_lock_timeout
Semaphore are going away in the future, so remove the unused function
wilc_lock_timeout which calls a semaphore api but has no users.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cathal Mullaney [Wed, 19 Oct 2016 21:43:25 +0000 (22:43 +0100)]
staging: unisys: visorbus: visorchannel: Refactor locking code to be statically deterministic.
This patch makes locking in visorchannel_signalempty statically
deterministic.
As a result this patch fixes the sparse warning:
Context imbalance in 'visorchannel_signalempty' - different lock
contexts for basic block.
The logic of the locking code doesn't change but the layout of the
original code is "frowned upon"
according to mails on sparse context checking.
Refactoring removes the warning and makes the code more readable.
Signed-off-by: Cathal Mullaney <chuckleberryfinn@gmail.com>
Tested-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Wed, 19 Oct 2016 15:51:30 +0000 (17:51 +0200)]
staging: wlan-ng: Replace data type declaration with variable of same type in prism2mgmt.c
sizeof(var) instead of sizeof(struct XXX) is preferred.
It also fix the following checkpatch.pl script warning:
WARNING: line over 80 characters
Fix this two in prism2mgmt.c file.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:23 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_KeyIDChanged
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:22 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_PSUserCount
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:21 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_AuthRequest
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:20 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_LinkStatus
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:19 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_HScanResult
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:18 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_HScanResultSub
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:17 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_ChInfoResult
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:16 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_CommTallies16
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:15 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase in fields of struct hfa384x_dbmcommsquality
Replace CamelCase fields of struct with underscores to comply
with the standard kernel coding style
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:14 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_WPAData
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:13 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: hfa384x_HostScanRequest_data
Replace CamelCase struct name and fields with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Wed, 19 Oct 2016 15:59:12 +0000 (17:59 +0200)]
staging: wlan-ng: avoid CamelCase: HFA384x_RID_CNFAPBCNint
Replace CamelCase define to comply with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ryan Swan [Tue, 18 Oct 2016 21:26:43 +0000 (17:26 -0400)]
staging: slicoss: replace memcpy_fromio with memcpy
As per discusion with Lino Sanfilippo, memcpy is the proper way to copy
across dma memory, which also removes sparse warning that triggered
inquiry.
Signed-off-by: Ryan Swan <ryan@ryanswan.com>
Reviewed-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiong Du [Mon, 24 Oct 2016 13:50:41 +0000 (21:50 +0800)]
staging: ks7010: Remove trailing whitespace
Fixes checkpatch error: tailing whitespace
Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nick Rosbrook [Fri, 21 Oct 2016 17:15:13 +0000 (13:15 -0400)]
staging: ks7010: ks7010_sdio.c: Fixing multiple assignments
Running checkpatch on ks7010_sdio.c shows two locations where
multiple assignment statements are used.
This patch modifies the assignments into single assignments.
Signed-off-by: Nick Rosbrook <nrosbrook@mail.smcvt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nick Rosbrook [Thu, 20 Oct 2016 17:08:06 +0000 (13:08 -0400)]
staging: ks7010: Corrected a spelling mistake
This patch corrects the spelling of 'initialize' in ks7010_sdio.c.
The issue was found by checkpatch.
Signed-off-by: Nick Rosbrook <nrosbrook@mail.smcvt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nick Rosbrook [Wed, 19 Oct 2016 22:52:04 +0000 (18:52 -0400)]
staging: ks7010: Add spaces around '*'
Added spaces around a '*' in ks7010_sdio.c. Issue found by checkpatch.
Signed-off-by: Nick Rosbrook <nrosbrook@mail.smcvt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Tue, 18 Oct 2016 14:38:33 +0000 (14:38 +0000)]
staging: ks7010: ks_wlan_net: Use setup_timer instead of init_timer and data fields
Use setup_timer function instead of initializing timer with the function
and data fields
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Tue, 18 Oct 2016 14:37:47 +0000 (14:37 +0000)]
staging: ks7010: convert list_for_each to entry variant
convert list_for_each() to list_for_each_entry() where
applicable.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Tue, 18 Oct 2016 14:38:06 +0000 (14:38 +0000)]
staging: ks7010: remove unused including <linux/version.h>
Remove including <linux/version.h> that don't need it.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Tue, 18 Oct 2016 14:37:10 +0000 (14:37 +0000)]
staging: i4l: pcbit: remove duplicated include from capi.c
Remove duplicated include.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Tue, 18 Oct 2016 14:37:26 +0000 (14:37 +0000)]
staging: i4l: pcbit: drv: remove duplicated include from drv.c
Remove duplicated include.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Mon, 17 Oct 2016 23:35:49 +0000 (23:35 +0000)]
staging: rts5208: rtsx.c: Fix invalid use of sizeof in rtsx_probe()
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.
Fixes:
2eb9d8cbb3c3 ("staging: rts5208: rtsx.c: Alloc sizeof struct")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Mon, 17 Oct 2016 15:05:36 +0000 (15:05 +0000)]
staging: bcm2708_vchiq: fix return value check in vchiq_init_state()
In case of error, the function kthread_create() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Mon, 17 Oct 2016 15:06:07 +0000 (15:06 +0000)]
staging: bcm2708_vchiq: fix return value check in vchiq_platform_conn_state_changed()
In case of error, the function kthread_create() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Mon, 17 Oct 2016 15:08:14 +0000 (15:08 +0000)]
staging: bcm2708_vchiq: remove .owner field for driver
Remove .owner field if calls are used which set it automatically.
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eric Anholt [Mon, 17 Oct 2016 19:44:05 +0000 (12:44 -0700)]
staging/vchi: Add a TODO file of things I know we need to deal with.
I've left out the downstream HDMI audio driver from the "to be
imported" section, as we'll want to handle it natively in vc4. The
downstream kernel will likely continue to use that driver for a while
due to using the interim "vc4 firmware KMS" mode while vc4 gets its
featureset (such as HDMI audio!) completed.
I've also left out VC-CMA, which appears to be about having Linux
manage a CMA area that the firmware gets to make allocations out of.
I'm not clear on if this is useful (the firmware's need for memory
drops massively with vc4 present, and may drop even more depending on
how we resolve dmabuf handling for camera and video decode)
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xavier Roumegue [Tue, 18 Oct 2016 20:56:50 +0000 (22:56 +0200)]
staging: clocking-wizard: Fix incorrect type of speed grade
The speed grade type is unsigned according to the dt-bindings.
Fix sparse issue (-Wtypesign):
CHECK drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c:162:56: warning: incorrect type in argument 3 (different signedness)
drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c:162:56: expected unsigned int [usertype] *out_value
drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c:162:56: got int *<noident>
Signed-off-by: Xavier Roumegue <xroumegue@gmail.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Moritz Fischer <moritz.fischer@ettus.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eric Anholt [Mon, 17 Oct 2016 19:44:06 +0000 (12:44 -0700)]
MAINTAINERS: Add the staging vchiq driver as a bcm2835 responsibility.
It's being merged to support firmware communication on the Raspberry
Pi, so we should probably send its patches to linux-rpi-kernel.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Sun, 23 Oct 2016 00:30:44 +0000 (22:30 -0200)]
staging: lustre: Move assignments out of function calls.
Assignments inside of function calls confuse the reader and should be
avoided, so it was moved out before the call.
Found with Coccinelle, semantic patch:
@@
identifier f;
expression e1, e2;
assignment operator a;
@@
+ e1 a e2;
f(...,
- (e1 a e2)
+ e1
,...);
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jinshan Xiong [Sat, 22 Oct 2016 00:34:49 +0000 (08:34 +0800)]
Staging: lustre: lov: check return value of lov_sub_get()
Check return value of lov_sub_get() in lov_io_read_ahead().
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 17 Oct 2016 22:08:56 +0000 (00:08 +0200)]
staging: lustre: remove broken dead code in cfs_cpt_table_create_pattern
After a recent bugfix, we get a warning about the use of an uninitialized
variable:
drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c: In function 'cfs_cpt_table_create_pattern':
drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c:833:7: error: 'str' may be used uninitialized in this function [-Werror=maybe-uninitialized]
This part of the function used to not do anything as we would reassign
the 'str' pointer to something else right away, but now we pass an
uninitialized pointer into 'strchr', which can cause a kernel page fault
or worse.
Fixes:
239fd5d41f9b ("staging: lustre: libcfs: shortcut to create CPT from NUMA topology")
Cc: Liang Zhen <liang.zhen@intel.com>
Cc: James Simmons <jsimmons@infradead.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 17 Oct 2016 22:42:27 +0000 (00:42 +0200)]
staging: lustre: restore initialization of return code
A recent rework dropped the initialization of the initialization of the
successful return code in lov_getstripe:
drivers/staging/lustre/lustre/lov/lov_pack.c: In function 'lov_getstripe':
drivers/staging/lustre/lustre/lov/lov_pack.c:426:9: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/staging/lustre/lustre/lov/lov_pack.c:313:6: note: 'rc' was declared here
This adds it back.
Fixes:
e10a431b3fd0 ("staging: lustre: lov: move LSM to LOV layer")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nadim Almas [Mon, 24 Oct 2016 16:44:37 +0000 (22:14 +0530)]
Staging:fbtft: Replace decimal permissions with 4 digit octal
ERROR: Use 4 digit octal (0777) not decimal permissions
This error was detected by checkpatch.pl
Signed-off-by: Nadim Almas <nadim.902@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Javier Martinez Canillas [Mon, 17 Oct 2016 19:21:21 +0000 (16:21 -0300)]
staging: fbtft: Fix module autoload
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/staging/fbtft/flexfb.ko | grep alias
$
After this patch:
$ modinfo drivers/staging/fbtft/flexfb.ko | grep alias
alias: platform:flexpfb
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Ciornei [Mon, 17 Oct 2016 18:43:08 +0000 (13:43 -0500)]
staging: fsl-mc: cleanup: convert uintX_t types to uX
Replace all uses of uintX_t types with uX types in order to comply with
kernel coding style and resolve checkpatch warnings.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 17 Oct 2016 18:43:01 +0000 (13:43 -0500)]
staging: fsl-mc: dprc: shorten DPRC interrupt name
improve readibility of the DPRC interrupt name in sysfs by
shortening this and just using the device name. There is only
one interrupt DPRC used, so no further differentiation is needed.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 17 Oct 2016 18:42:53 +0000 (13:42 -0500)]
staging: fsl-mc: irq: shorten name of interrupt name
For /proc/interrupts readability, platform bus MSIs are named
"ITS-pMSI" in the GIC ITS implementation for that bus. Follow
a similar naming convention and call fsl-mc bus MSIs
"ITS-fMSI".
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 17 Oct 2016 18:42:40 +0000 (13:42 -0500)]
staging: fsl-mc: update Kconfig dependency
The Kconfig dependency previously included ARM64, which is not
strictly correct. Change it to ARCH_LAYERSCAPE which is the
SoC platform that includes the DPAA2 hardware.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 17 Oct 2016 18:42:34 +0000 (13:42 -0500)]
staging: fsl-mc: clean up Kconfig description
Except for copyrights we are avoiding all references
to Freescale, which no longer exists as a brand. Cleanup
Freescale references and simplify the Kconfig description
of the fsl-mc bus.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 17 Oct 2016 18:42:28 +0000 (13:42 -0500)]
staging: fsl-mc: add missing includes to fsl-mc-private.h
fsl-mc-private.h references several definitions that it does not explicitly
have includes for. Up until now we've gotten lucky due to include ordering
that things compile. Add the missing includes.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 17 Oct 2016 18:42:18 +0000 (13:42 -0500)]
staging: fsl-mc: cleanup: move dpbp and dpcon cmd headers
The dpbp and dpcon cmd header files should not be in the public
include directory but should be private to the bus driver.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 24 Oct 2016 15:38:34 +0000 (17:38 +0200)]
staging: rtl8192x: fix bogus maybe-uninitialized warning
The rtllib_rx_extract_addr() is supposed to set up the mac addresses
for four possible cases, based on two bits of input data. For
some reason, gcc decides that it's possible that none of the these
four cases apply and the addresses remain uninitialized:
drivers/staging/rtl8192e/rtllib_rx.c: In function ‘rtllib_rx_InfraAdhoc’:
include/linux/etherdevice.h:316:61: error: ‘*((void *)&dst+4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/staging/rtl8192e/rtllib_rx.c:1318:5: note: ‘*((void *)&dst+4)’ was declared here
ded from /git/arm-soc/drivers/staging/rtl8192e/rtllib_rx.c:40:0:
include/linux/etherdevice.h:316:36: error: ‘dst’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/staging/rtl8192e/rtllib_rx.c:1318:5: note: ‘dst’ was declared here
This warning is clearly nonsense, but changing the last case into
'default' makes it obvious to the compiler too, which avoids the
warning and probably leads to better object code too.
As the same warning appears in other files that have the exact
same code, I'm fixing it in both rtl8192e and rtl8192u, even
though I did not observe it for the latter.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Carlos Maiolino [Mon, 17 Oct 2016 15:39:22 +0000 (17:39 +0200)]
staging: rtl8188eu: Fix coding style errors
Fix coding style errors reported by checkpatch.pl, specifically:
ERROR: space prohibited before that ',' (ctx:WxW)
This patch get rid of all "ERROR" messages from checkpatch.pl for this file
Signed-off-by: Carlos Maiolino <cmaiolino28@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shyam Saini [Mon, 17 Oct 2016 13:34:46 +0000 (19:04 +0530)]
Staging: gs_fpgaboot: Use octal permissions '0444'
Fixed following checkpatch warning
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider
using octal permissions '0444'.
Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pankaj Bharadiya [Mon, 17 Oct 2016 10:47:08 +0000 (16:17 +0530)]
staging: dgnc: Replace CamelCase namings with underscores
Replace CamelCase names with underscores to comply with the standard
kernel coding style.
Signed-off-by: Pankaj Bharadiya <pankaj.bharadiya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pankaj Bharadiya [Mon, 17 Oct 2016 10:47:07 +0000 (16:17 +0530)]
staging: dgnc: Remove some redundant functions
dgnc_tty_preinit() and dgnc_tty_post_uninit() functions are used to
allocate and free "dgnc_TmpWriteBuf" and this "dgnc_TmpWriteBuf" is
not really getting used. Hence remove these redundant functions.
Also remove dgnc_TmpWriteBuf variable as it is not used anymore.
Signed-off-by: Pankaj Bharadiya <pankaj.bharadiya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pankaj Bharadiya [Mon, 17 Oct 2016 09:12:36 +0000 (14:42 +0530)]
staging: greybus: audio: remove redundant slot field
gb_audio_manager_module_descriptor's intf_id field maintains the
information about the interface on which module is connected hence
having an extra slot field is redundant.
Thus remove the slot field and its associated code.
Signed-off-by: Pankaj Bharadiya <pankaj.bharadiya@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rahul Krishnan [Fri, 21 Oct 2016 15:29:28 +0000 (20:59 +0530)]
Staging: Greybus: Fix trailing */ in block comments
This patch fixes the following checkpath.pl warning
WARNING: Block comments use a trailing */ on a separate line
Signed-off-by: Rahul Krishnan <mrahul.krishnan@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rui Miguel Silva [Wed, 19 Oct 2016 12:44:25 +0000 (13:44 +0100)]
staging: greybus: es2: fix arpc request size
Fix size field of arpc message request by using the header size and not
the pointer size.
Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Fri, 14 Oct 2016 22:00:11 +0000 (19:00 -0300)]
staging: greybus: audio_manager_sysfs: Replace sscanf with kstrto* to single variable conversion.
Fix checkpatch warning:
WARNING: Prefer kstrto<type> to single variable sscanf
kstrto* is designed to convert string to numerical value and makes
it easier to understand what the code does.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Reviewed-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Mon, 17 Oct 2016 23:57:58 +0000 (21:57 -0200)]
staging: xgifb: Remove unnecessary parentheses.
The removed parentheses are unnecessary and don't add readability.
Found using Coccinelle semantic patch:
@@ expression e, e1, e2; @@
e &=
(
(e1 == e2)
|
- (e1)
+ e1
)
@@ expression e, e1, e2; @@
e |=
(
(e1 == e2)
|
- (e1)
+ e1
)
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Tue, 18 Oct 2016 00:01:26 +0000 (22:01 -0200)]
staging: vt6656: Remove unnecessary parentheses.
The removed parentheses are unnecessary and don't add readability.
Found using Coccinelle semantic patch:
@@ expression e, e1, e2; @@
e +=
(
(e1 == e2)
|
- (e1)
+ e1
)
@@ expression e, e1, e2; @@
e =
(
(e1 == e2)
|
- (e1)
+ e1
)
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mihaela Muraru [Mon, 17 Oct 2016 14:20:18 +0000 (17:20 +0300)]
Staging: android: ion: Make a read-only structure
This patch add const qualifier at the declaration of the structure.
The structure become a read-only data, this increase the security.
Found with Coccinelle:
@r disable optional_qualifier@
identifier s,i;
@@
* static struct s i ={...};
Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Tue, 18 Oct 2016 00:00:07 +0000 (22:00 -0200)]
staging: android: Remove unnecessary parentheses.
The removed parentheses are unnecessary and don't add readability.
Found using Coccinelle semantic patch:
@@ expression e, e1, e2; @@
e =
(
(e1 == e2)
|
- (e1)
+ e1
)
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Zoran [Wed, 19 Oct 2016 22:58:54 +0000 (15:58 -0700)]
staging: vc04_services: Add casts to remove warnings in vchiq_core.c
When compiling vchiq_core.c for 64 bit, the compiler
emits a few warnings that are not actual issues. This
change adds a few casts to remove the extra unnecessary
warnings.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Zoran [Wed, 19 Oct 2016 22:58:48 +0000 (15:58 -0700)]
staging: vc04_services: Handle conversion from VCHIQ_SERVICE_HANDLE_T to VCHI_SERVICE_HANDLE_T
A VCHIQ_SERVICE_HANDLE_T which is an int is stuffed into a
VCHI_SERVICE_HANDLE_T which is a pointer, passed around, then
converted back to a VCHIQ_SERVICE_HANDLE_T. Since the data is
always actually a VCHIQ_SERVICE_HANDLE_T(int), never actually a
pointer, it is safe to simply cast the two back in forth.
Note that pointers are never stuffed into an int.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Zoran [Wed, 19 Oct 2016 22:58:34 +0000 (15:58 -0700)]
staging: vc04_services: Convert pointers in shared state to offsets
The arm processor core and the GPU have a shared data structure.
This structure contains pointers to base linux kernel objects such as
events. The size of the pointer changes between 32 bit and 64 bit,
so it is necessary to convert these pointers to offsets from the
beginning of the state structure.
Luckly, the GPU does not interpret these pointers/offsets,
but this change is necessary to keep the structure the same since
the GPU code is outside the scope of the linux kernel
and can't be easily changed.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Zoran [Wed, 19 Oct 2016 22:58:27 +0000 (15:58 -0700)]
staging: vc04_services: Change fields of page list structure to fixed length
The arm processor core and the GPU have shared data structures.
One of these structures is a list of pages of data for messages.
This structure can not change since it is dependent on the GPU
firmware which is external to the kernel. Convert the fields
of this structure to fixed length fields.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Zoran [Wed, 19 Oct 2016 22:58:09 +0000 (15:58 -0700)]
staging: vc04_services: Convert dsb() to dsb(sy)
The dsb() macro for 32 arm compiles to dsb(sy) in the binary file.
This macro is no longer supported on arm64, so instead use dsb(sy)
which is completely binary compatible.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 24 Oct 2016 09:34:22 +0000 (11:34 +0200)]
Merge tag 'iio-for-4.10a' of git://git./linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
First round of IIO new device support, features and cleanups for the 4.10 cycle.
Fair number of outreachy related patches in here. Some of these may well
have already been picked up by Greg but git will sort that out for us.
Also some good staging cleanup work from other sources. Thanks Brian and Lars
in particular for this.
New device support
* ACCES 104-quad-8
- New driver for this 8 channel encoder input board. Lots of new ABI with
this one.
* AD7766
- New driver supporting AD7766, AD7766-1, AD7766-2, AD7767, AD7767-1 and
AD7767-2 24 bit ADCs.
* dmard 10
- New driver for this 3 axis accelerometer.
* Honeywell ABP pressure sensors.
- New driver covering 56 parts in this series (too many to list here!)
* HTS221
- New driver to support this relative humidiy and temperature device.
* LMP91000
- New driver for this potentiostat (form of chemical sensor). Nice example
of use of the buffered consumer interfaces and the use of a consumer
provided trigger.
* MiraMEMS DA311
- New driver for this 3 axis accelerometer.
* MiraMEMS DA280
- New driver for this 3 axis accelerometer. Follow up caught up with
vendor prefixes for these.
Staging graduations
* isl29018 light sensor
- Fixes and cleanups listed below (thanks for your hard work on this Brian!)
* sca3000
- Fixes and cleanups listed below. This was one of the small set of drivers
that went into staging when IIO was first added. Turns out it had a few
bugs and needed to be brought into the modern era! Not clear if I am
the only person who actually has one of these still wired to a board.
New features (Core)
- Add an iio_trigger_validate_own_device helper which relies on the device
and trigger having the same parent. Convenient to have this for some
of the more complex trigger / device interactions. Was hand rolled in
a few drivers already so good to bring it into the core.
- Add an iio_read_channel_offset in kernel access helper (similar to
the existing one for scale).
- IIO_ATTR_{RO, WO, RW} and IIO_DEVICE_ATTR_{RO, WO, RW} macros. These
lead some rather contrived function naming, but there is no denying they
do reduced boilerplate. I'm going to resist their introduction in
drivers 'unless' they form part of a larger set of cleanups.
- Counter channel type and index type.
New features (Drivers)
* hdc100x
- Triggered buffer support.
* mcp4725
- Device tree bindings and support.
- Voltage reference selection.
* ti-adc0832
- Triggered buffer support.
* ti-adc161s626
- Add regulator support allowing _scale and _offset values to be established
and exported.
New features (Tools)
* iio_generic_buffer
- -A option to force enable all channels rather than faulting if some are
already enabled (like -a does). Followup patches tidied this support up.
Cleanups (Core)
- Use kmalloc_array in iio_scan_mask_set.
- Take event_attrs field of iio_info structure constant
- Staging todo list updates. Most of it was long done.
- MAINTAINERS had a wrong directory listing.
Cleanups (Drivers)
* Missing i2c trivial devices entries.
* ad5592r
- Fix an endian type related sparse warnings.
* ad7150
- Constify the event attribute_group structures.
* ad7152
- Add some blank lines to improve readability.
- Sampling frequency control via chan-info element rather than hand rolled
attributes.
- add a new lock to avoid use of mlock for non state change related locking.
* ad7280
- Constify atrribute_group structure (second patch covers the event ones)
* ad7606 (Lars is driving most of the cleanup on this with some additions from
Eva)
- Fix improper setting of oversampling pins. This has been broken a very
long time in this staging driver, so not going to push this back to stable.
- Implement oversampling configuration via the chan_info mask element.
- Remove an unused int_vref_mv field.
- Remove a reundant name field from ad7606_chip_info.
- Remove default device configuration from platform_data in favour of
whatever the power on defaults are.
- Remove out of band error reporting in the kernel log as not providing
much information.
- Fix oversampling ratio by having 1 be the value for no oversampling.
- Avoid allocating buffer for each data capture.
- Factor out common code between periodic and one-shot capture.
- Move set_drvdat into common code.
- Let the common probe function return int rather than jumping through
an ERR_PTR.
- Pass struct device * into common remove to simplify code.
- Always run trigger handler only once per event (no one can remember why
it was being possibly done twice).
- Move over to the GPIO descriptor API to shorten and clarify code.
- Move the buffer code into the main file as it's not optional and is
now rather short in this driver.
- Fix the naming of the supply regulator.
- Rework regulator handling to handle errors including deferred probing.
- Tidy up a ptr_err or 0 return.
* ad7746
- Sampling frequency control via info_mask element rather than hand rolled
* ad7758
- Sampling frequency control via info_mask element rather than hand rolled
attributes.
* ad7816
- Constify the event attribute_group structure.
* adt7316
- Constify the event attribute group structures.
* ak8974
- Cleanup some sparse warnings about endian types.
* ak8975
- Cleanup some sparse warnings about endian types.
* bmi160
- Spare endian warning cleanups.
* isl29018 (towards staging graduation)
- Remove unusedvariables and defines.
- Improve consistency of error handling.
- Signed / unsigned comparison fixes.
- Use the IIO_DEVICE_ATTR_{RO, RW} macros
- Fix a race in in_illuminance_scale_available_show.
- Cleanup exit points of _read_raw
- Sanity check if in suspended state during a write_raw call as was already
done for read_raw.
- Document device tree bidnings.
- Document infrared supression controls.
- Add some newlines to improve readability and drop one that shouldn't be
there.
- Fix a poorly named functions name.
- Fix multiline coment syntax.
- Tidy up a pair or return statements by unifying them.
- Rename description in Kconfig for consistency with similar drivers.
* lidar
- cleanup power management by dropping unnecessary call.
* ltr501
- Use the claim_direct_mode helpers. Fix a race condition along the way.
* max1027
- Fix a dubious x | !y sparse warning.
- Use the new iio_trigger_validate_own_device helper.
* max440000
- Clean up some sparse warnings about endian types.
* mcp4725
- Use the regulator framework to establish the reference voltage rather than
getting it from platform data.
- Tidy up a comment typo.
- Fix a wrong PTR_ERR query (wrong regulator).
* mma7660
- Take a mma7660_nscale static.
* mma8452
- Use the new iio_trigger_validate_own_device helper.
- Use claim_direct_mode helpers - fix a race condition along the way.
* mpl3115
- Use claim_direct_mode helpers - fix a race condition along the way.
* ms65611
- Tidy up regulator error handling and clean out a static warning in the mix.
* sca3000
- Avoid a potential unitialized variable if a hardware read returns a value
that isn't actually supported (mostly warning supression).
- Fix a use before setting of the indio_dev->buffer pointer. Broken for
a very long time so not going to rush this into stable.
- Merge buffer file with core file. We used to always split these.
Sometimes it's just not worth the hassle. In this case the device's main
feature is it's hardware fifos so unlikely anyone would want to run it
without.
- Drop the sca3000_register_ring_funcs function as it's a pointless wrapper
once we have only one file.
- Fix cleaning of flag + setting of size of scan. Without this you can't
start the buffer twice and expect sensible (or any) results. Again,
broken for a long time so not heading for stable.
- Drop the custom watershed setting ABI - for now we'll just support one
value.
- Move to a hybrid hard / soft buffer design (how we've been doing it
for similar devices for a while now!)
- Cleanup some unusued variables.
- Use a fake channel to support core handling of freefall event registration.
- Cleanup the register defines.
- Fix an off by one error in axis due to IIO_NO_MOD taking up the 0 value.
Been broken since first admission of IIO to the staging tree.
- Add readback of the 3db low pass filter frequency and later writing
allowing droppign of custom measurement mode attributes as they can
be represented by the filter choices that is their main characteristic.
- Drop non standard revision attr and replace with dev_info on probe.
- Avoid a race in probe.
- Various formatting fixes.
- Kernel-docify docs that were very nearly in the write format.
* tsl2583
- Constify attribute_group structure.
* zpa2326
- Drop a redundant DEBUG ifdef.
Cleanups (Tools)
* iio_generic_buffer
- Fix the ? arguement. Previously it sort of worked as you got the help
message as a result of it not recognising the arguement.
Julia Lawall [Sat, 22 Oct 2016 20:41:32 +0000 (22:41 +0200)]
iio: dac: mcp4725: fix odd_ptr_err.cocci warnings
PTR_ERR should access the value just tested by IS_ERR
Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci
CC: Tomas Novotny <tomas@novotny.cz>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
kbuild test robot [Sat, 22 Oct 2016 19:12:42 +0000 (03:12 +0800)]
staging:iio:ad7606: fix ptr_ret.cocci warnings
drivers/staging/iio/adc/ad7606.c:357:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
CC: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Matt Ranostay [Sat, 15 Oct 2016 18:04:37 +0000 (11:04 -0700)]
iio: proximity: pulsedlight-lidar-lite-v2: cleanup power management
Remove pm_runtime_mark_last_busy() call that wasn't need in the probe
since the device should be put to sleep.
Clarification from Matt:
Basically it going to be suspended once pm_runtime_idle() is called,
and setting the last busy is useless and not needed.
Clearly this doesn't affect the device running but just makes the code
more consistent with other uses.
Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Akinobu Mita [Sun, 16 Oct 2016 15:59:42 +0000 (00:59 +0900)]
iio: ti-adc0832: add triggered buffer support
This adds triggered buffer support for the ti-adc0832 driver. Tested with
ADC0831 and ADC0832 by using SYSFS trigger.
Signed-off-by: Akinobu Mita <akinobu.mita@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-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Alison Schofield [Fri, 2 Sep 2016 17:23:17 +0000 (10:23 -0700)]
iio: humidity: hdc100x: add triggered buffer support for HDC100X
Triggered buffer support uses the HDC100X's dual acquisition mode
to read both humidity and temperature in one shot.
This patch depends on
447136effbf4 ("iio: humidity: hdc100x: fix sensor data reads of
temp and humidity")
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Tomas Novotny [Tue, 18 Oct 2016 17:43:09 +0000 (19:43 +0200)]
iio: dac: mcp4725: add devicetree support
Signed-off-by: Tomas Novotny <tomas@novotny.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Tomas Novotny [Tue, 18 Oct 2016 17:43:08 +0000 (19:43 +0200)]
iio: dac: mcp4725: support voltage reference selection
MCP47x6 chip supports selection of a voltage reference (VDD, VREF buffered
or unbuffered). MCP4725 doesn't have this feature thus the eventual setting
is ignored and user is warned.
The setting is stored only in the volatile memory of the chip. You need to
manually store it to the EEPROM of the chip via 'store_eeprom' sysfs entry.
Signed-off-by: Tomas Novotny <tomas@novotny.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Tomas Novotny [Tue, 18 Oct 2016 17:43:07 +0000 (19:43 +0200)]
Documentation: dt: iio: add mcp4725/6 dac device binding
Signed-off-by: Tomas Novotny <tomas@novotny.cz>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Tomas Novotny [Tue, 18 Oct 2016 17:43:06 +0000 (19:43 +0200)]
iio: dac: mcp4725: fix incorrect comment
Number 2 is referencing to the settings with the largest available
resistor.
No functional change.
Signed-off-by: Tomas Novotny <tomas@novotny.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Eva Rachel Retuya [Thu, 20 Oct 2016 13:08:23 +0000 (21:08 +0800)]
staging: iio: ad7606: rework regulator handling
Currently, this driver ignores all errors from regulator_get(). The way
it is now, it also breaks probe deferral (EPROBE_DEFER). The correct
behavior is to propagate the error to the upper layers so they can
handle it accordingly.
Rework the regulator handling so that it matches the standard behavior.
If the specific design uses a static always-on regulator and does not
explicitly specify it, regulator_get() will return the dummy regulator.
Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Eva Rachel Retuya [Thu, 20 Oct 2016 13:08:22 +0000 (21:08 +0800)]
staging: iio: ad7606: set proper supply name to devm_regulator_get()
The name passed to devm_regulator_get() should match the name of the
supply as specified in the device datasheet. The supply on this device
is called 'AVcc' while currently, the driver uses just 'vcc'.
Use 'avcc' to specify the supply voltage since it is custom to use the
lower-caps version of the datasheet name.
Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 19 Oct 2016 17:07:08 +0000 (19:07 +0200)]
staging:iio:ad7606: Move buffer code to main source file
Currently the ad7606 buffer handling code resides in its own source file.
But this file contains only 4 small functions of which half are just
wrappers around other functions. Buffer support is also always enabled for
this driver, so move them over to the main source file. This reduces the
amount of boilerplate code.
Also rename the main function from ad7606_core.c to ad7606.c since there is
only a single file now.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 19 Oct 2016 17:07:07 +0000 (19:07 +0200)]
staging:iio:ad7606: Use GPIO descriptor API
Convert the ad7606 driver away from the deprecated legacy GPIO API and use
the new GPIO descriptor API.
This also means that the platform data struct is now empty and can be
removed.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 19 Oct 2016 17:07:06 +0000 (19:07 +0200)]
staging:iio:ad7606: Run trigger handler only once per trigger event
Currently the ad7606 driver installs the same function for the hard-irq and
threaded trigger handlers. This was introduced in commit
1caf7cb46135
("staging:iio:adc:ad7606 Convert to new channel registration method Update
Add missing call to iio_trigger_notify_done() Set pollfunc top and bottom
half handler"). Unfortunately the commit message does not mention why this
was done and Michael does not remember either.
Since the trigger handler function is idempotent (set a GPIO to 1) running
it twice does not do any harm, but is simply not necessary either. So set
the threaded trigger handler for the driver to NULL.
While we are at it also remove the function description comment that does
no say anything that can't be derived from the function name itself.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 19 Oct 2016 17:07:05 +0000 (19:07 +0200)]
staging:iio:ad7606: Let common remove function take a struct device *
Currently the common remove function takes a struct iio_dev *. This
parameter is retrieved by the individual driver remove functions by calling
get_drvdata() on their device. To simplify the code let the common remove
function directly take a struct dev * and do the IIO device in retrieval
the common remove function.
This also aligns the interface with the common probe function.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 19 Oct 2016 17:07:04 +0000 (19:07 +0200)]
staging:iio:ad7606: Let the common probe function return int
The common probe function for the ad7606 currently returns a struct iio_dev
pointer. The returned value is not used by the individual driver probe
functions other than for error checking.
Let the common probe function return a int instead to report the error
value directly (or 0 on success). This allows to simplify the code.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 19 Oct 2016 17:07:03 +0000 (19:07 +0200)]
staging:iio:ad7606: Move set_drvdata() into common code
Both the platform_device and SPI driver call set_drvdata() at the end of
their probe function. Move this into the common probe() function to reduce
duplicated code.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 19 Oct 2016 17:07:02 +0000 (19:07 +0200)]
staging:iio:ad7606: Factor out common code between periodic and one-shot capture
Both the periodic buffer based and one-shot sysfs based capture methods
share a large portion of their code. Factor this out into a common helper
function.
Also provide a comment that better explains in more detail what is going on
in the capture function.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 19 Oct 2016 17:07:01 +0000 (19:07 +0200)]
staging:iio:ad7606: Avoid allocating buffer for each data capture
Currently the ad7606 driver dynamically allocates and frees a transfer
buffer each time a sample capture is performed in buffered mode, which
introduces unnecessary overhead. The driver state struct already contains a
buffer that is used for transfers in one-shot mode. This buffer is large
enough to hold all samples, but not the timestamp that might be present in
buffered mode. Extend the buffer size to be able to contain the timestamp
and update the buffered capture function to use this buffer.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 19 Oct 2016 17:07:00 +0000 (19:07 +0200)]
staging:iio:ad7606: Use oversampling ratio of 1 for no oversampling
Currently the ad7606 driver uses a value of 0 for the oversampling ratio to
express that no oversampling is done. Strictly speaking this means though
that no data capture is done at all. Instead change the driver to use a
value of 1, this is in accordance with what other drivers do and what the
IIO spec suggests.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 19 Oct 2016 17:06:59 +0000 (19:06 +0200)]
staging:iio:ad7606: Remove out-of-band error reporting
Currently the ad7606 driver prints a error message to the kernel log when
an application writes an invalid value to a sysfs attribute. While for
initial driver development and testing this might be useful it is quite
disadvantageous in a production environment. The write() call to the sysfs
attribute will already return an error if the value was invalid so the
application is aware that the operation failed. And generally speaking it
is impossible for an application to reliably match a log message in the
kernel log to a specific operation it performed, so the message becomes
just noise and might distract from more critical messages.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 19 Oct 2016 17:06:58 +0000 (19:06 +0200)]
staging:iio:ad7606: Remove default device configuration from platform data
While for some very selected setups it might be useful to be able to
provide default configuration data via the platform data, generally this
becomes very impractical as the number of configuration options increases.
So the general policy is to use the power-on default values of the device
and let the application using the device configure it according to its
needs.
Implement this scheme for the ad7606 driver by removing support for
specifying a default configuration via the platform data.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>