Arushi Singhal [Tue, 21 Mar 2017 11:42:34 +0000 (17:12 +0530)]
staging: speakup: Match alignment with open parenthesis.
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis".
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Tue, 21 Mar 2017 11:42:32 +0000 (17:12 +0530)]
staging: speakup: Removed Unnecessary parentheses.
Unnecessary parentheses are removed to improve readability.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Tue, 21 Mar 2017 11:42:31 +0000 (17:12 +0530)]
staging: speakup: spaces preferred around operator
Fixed the checkpatch.pl issues like:
CHECK: spaces preferred around that '&' (ctx:VxV)
CHECK: spaces preferred around that '|' (ctx:VxV)
CHECK: spaces preferred around that '-' (ctx:VxV)
CHECK: spaces preferred around that '+' (ctx:VxV)
etc.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Tue, 21 Mar 2017 11:42:30 +0000 (17:12 +0530)]
staging: speakup: Moved OR operator to previous line.
Moved logical OR operator to previous line to fix the following
checkpatch issue:
CHECK: Logical continuations should be on the previous line.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Tue, 21 Mar 2017 11:42:28 +0000 (17:12 +0530)]
staging: speakup: fixes braces {} should be used on all arms of this statement
This patch fixes the checks reported by checkpatch.pl
for braces {} should be used on all arms of this statement.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Tue, 21 Mar 2017 11:42:27 +0000 (17:12 +0530)]
staging: speakup: Simplify "NULL" comparisons
Fixed coding style for null comparisons in speakup driver to be more
consistant with the rest of the kernel coding style.
Replaced 'x != NULL' with 'x' and 'x = NULL' with '!x'.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Tue, 21 Mar 2017 11:42:25 +0000 (17:12 +0530)]
staging: speakup: Moved logical to previous line.
Moved logical operator to previous line to fix the following
checkpatch issue:
CHECK: Logical continuations should be on the previous line.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pranay Kr. Srivastava [Tue, 21 Mar 2017 07:10:23 +0000 (12:40 +0530)]
remove unnecessary initial allocation of vc
This patch removes the unnecessary allocation of
current foreground vc during initialization.
This initialization is already handled in the loop
that follows it for all available virtual consoles.
Signed-off-by: Pranay Kr. Srivastava <pranjas@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pranay Kr. Srivastava [Tue, 21 Mar 2017 07:10:22 +0000 (12:40 +0530)]
return same error value from spk_set_key_info
This patch makes spk_set_key_info return -EINVAL
in case of failure instead of returning 4 different
values for the type of error that occurred.
Print the offending values instead as debug message.
Signed-off-by: Pranay Kr. Srivastava <pranjas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:39:56 +0000 (14:39 +0000)]
ov5693: remove unused function
It's commented out in the tree with a note saying to remove it. So let's remove it.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Samuel Thibault [Tue, 21 Mar 2017 23:55:31 +0000 (00:55 +0100)]
speakup: Fix spurious space pronunciation on spelling letters
This gathers emitting the caps start string, space, spelled letter
string, space, and caps stop string, into one printf, to avoid
sending to the synth a space character alone, which the synth would
then pronounce.
Similarly, emit space along control-letter and letter spelling.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Zahari Yurukov <zahari.yurukov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Wed, 22 Mar 2017 10:56:03 +0000 (11:56 +0100)]
Merge tag 'iio-for-4.12b' of git://git./linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
2nd set of new device support, features and cleanups for IIO in the 4.12 cycle
A good collection of outreachy related patches in here - mostly staging
driver cleanup. Also a fair number of patches added explicit OF device ID
tables for i2c drivers - a precursor to dropping (eventually) the implicit
probing.
New Device Support
* Allwinner SoC ADC.
- So far covers the sun4i-a10, sun5i-a13 and sun6i-a31 general purpose ADCs,
including thermal side of things.
This missed the last cycle due to my incompetence, so good to get in now,
particularly as various patches dependent on it are appearing.
* ltc2632
- new driver supporting ltc2632-l12, ltc2632-l10, ltc2632-l8, ltc2632-h12,
ltc-2632-h10, ltc-2632-h8 dacs
Cleanups
* Documentation
- drop a broken reference to i2c/trivial-devices
* ad2s1200
- drop & from function pointers for consistency.
* ad2s1210
- formatting fixes.
* ad7152
- octal permissions instead of symbolic.
- drop & from function pointers for consistent usage.
* ad7192
- drop & from function pointers for consistent usage.
* ad7280
- replace core mlock usage with a local lock as mlock is intended only to
protect the current device state (direct reads, or triggered and buffered)
* ad7746
- drop & from function pointers for consistent usage.
- replace core mlock usage with a local lock as mlock is intended only to
protect the current device state (direct reads, or triggered and buffered)
* ad7754
- move contents of header file into source file as not used anywhere else.
* ad7759
- move contents of header file into source file as not used anywhere else.
* ad7780
- drop & from function pointers for consistent usage.
* ad7832
- replace core mlock usage with a local lock as mlock is intended only to
protect the current device state (direct reads, or triggered and buffered)
* ad9834
- replace core mlock usage with a local lock as mlock is intended only to
protect the current device state (direct reads, or triggered and buffered)
- drop an unnecessary goto in favour of direct return.
* adis16060
- drop & from function pointers as inconsistent.
* adis16201
- drop a local mutex as the adis core already protects everything necessary.
- drop & from function pointers for consistent usage.
* adis16203
- drop & from function pointers for consistent usage.
* adis16209
- drop a local mutex as the adis core already protects everything necessary.
- use an enum for scan index giving slightly nicer code.
- drop & from function pointers for consistent usage.
* adis16240
- drop a local mutex as the adis core already protects everything necessary.
- use an enum for scan index giving slightly nicer code.
- drop & from function pointers for consistent usage.
* apds9960
- add OF device ID table.
* bma180
- add OF device ID table.
- prefer unsigned int to bare use of unsigned.
* bmc150_magn
- add OF device ID table.
* hmp03
- add OF device ID table.
* ina2xx
- add OF device ID table.
* itg3200
- add OF device ID table.
* mag3110
- add OF device ID table.
* max11100
- remove .owner field as it is set by the spi core.
* max5821
- add .of_match_table set to the ID table which was present but not used.
* mcp4725
- add OF device ID table.
* mlx96014
- add OF device ID table.
* mma7455
- add OF device ID table.
* mma7660
- add OF device ID table.
* mpl3115
- add OF device ID table.
* mpu6050
- add OF device ID table.
* pc104
- mask pc104 drivers behind a global pc104 config option.
* ti-ads1015
- add OF device ID table.
* tsl2563
- add OF device ID table.
* us5182d
- add OF device ID table.
Maxime Roussin-Belanger [Fri, 17 Mar 2017 18:04:02 +0000 (14:04 -0400)]
iio: dac: Add support for ltc2632 DACs
Add support for Linear Technology LTC2632 (SPI) family of·
dual 12- 10-, and 8-bits output DACs.
Signed-off-by: Maxime Roussin-Belanger <maxime.roussinbelanger@gmail.com>
Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Tobin C. Harding [Tue, 21 Mar 2017 02:37:12 +0000 (13:37 +1100)]
staging: ks7010: rename return value identifier
Driver uses multiple identifier names for the same task (retval, ret,
rc). It would be easier to read the code if a single task is
identified with a single name. 'ret' is the most common return value
identifier name found in the kernel tree, following the principle of
least surprise using 'ret' is a decent choice.
Rename rc -> ret
Rename retval -> ret
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 21 Mar 2017 02:37:11 +0000 (13:37 +1100)]
staging: ks7010: remove zero comparison
Comparison, equal to zero, is redundant
'if (foo == 0)' is equal to 'if (!foo)'
Typical kernel coding style is to use the shorter form.
Remove unnecessary zero comparison.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 21 Mar 2017 02:37:10 +0000 (13:37 +1100)]
staging: ks7010: remove non-zero comparison
Comparison, does not equal zero, is redundant
'if (foo != 0)' is equal to 'if (foo)'
Typical kernel coding style is to use the shorter form.
Remove unnecessary non-zero comparison.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 21 Mar 2017 02:37:09 +0000 (13:37 +1100)]
staging: ks7010: make goto labels uniform
Driver uses different label forms for similar purposes. It would be
more clear if single use case has uniform label. 'out' is generic and
adds no meaning to label.
Documentation/process/coding-style.rst:
Choose label names which say what the goto does or why the goto
exists.
Rename labels so as to better describe what they do. If an execution
path only exists for the label on an error, prefix the label with
'err_'. If a non-error execution path exist do not use prefix.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 21 Mar 2017 02:37:08 +0000 (13:37 +1100)]
staging: ks7010: return directly on error
Function uses goto label with no clean up code. In this case we
should just return directly.
Remove goto statement, return directly on error.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 21 Mar 2017 02:37:07 +0000 (13:37 +1100)]
staging: ks7010: fix checkpatch MULTIPLE_ASSIGNMENTS
Checkpatch emits CHECK: multiple assignments should be avoided.
Move multiple line assignment to individual lines.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 21 Mar 2017 02:37:06 +0000 (13:37 +1100)]
staging: ks7010: fix checkpatch BRACES
Checkpatch emits CHECK: Unbalanced braces around else
statement. Statements in question are single statements so we do not
need braces. Checkpatch also warns about multiple line dereference for
this code.
Fix if/else/else if statement use of braces. Fix function argument layout
at the same time since it is the same statement.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 21 Mar 2017 02:37:05 +0000 (13:37 +1100)]
staging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENT
Checkpatch emits CHECK: Alignment should match open parenthesis.
Fix alignment to open parenthesis in line with kernel coding style.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 21 Mar 2017 02:37:04 +0000 (13:37 +1100)]
staging: ks7010: fix checkpatch SPACING
Checkpatch emits CHECK: No space is necessary after a cast.
Remove unnecessary space after cast.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 21 Mar 2017 02:37:03 +0000 (13:37 +1100)]
staging: ks7010: fix checkpatch LINE_SPACING
Checkpatch emits CHECK: Please use a blank line after
function/struct/union/enum declarations.
Add blank line after function definition.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sat, 18 Mar 2017 08:42:11 +0000 (08:42 +0000)]
staging: vchiq_arm: Fix MODULE_LICENSE
Regarding to the header the driver is licensed under BSD and GPL.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arvind Yadav [Fri, 17 Mar 2017 06:51:23 +0000 (12:21 +0530)]
Staging: media: Unmap and release region obtained by ioremap_nocache
Free memory mapping, if vpfe_ipipe_init is not successful.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Mon, 20 Mar 2017 14:06:56 +0000 (19:36 +0530)]
staging:sm750fb: Code readability is improved.
New variables are added to make the code more readable.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ding-Chi Wang [Sat, 18 Mar 2017 08:59:14 +0000 (16:59 +0800)]
staging: rtl8712: checkpatch: Avoid multiple line dereferences
"WARNING: Avoid multiple line dereference - prefer 'poid_par_priv->information_buf_len'"
"WARNING: Avoid multiple line dereference - prefer 'padapter->registrypriv.dev_network.Configuration'"
"WARNING: Avoid multiple line dereference - prefer 'Adapter->mppriv.workparam.io_value'"
Signed-off-by: Ding-Chi Wang <dcwang.tw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Narcisa Ana Maria Vasile [Sat, 18 Mar 2017 16:56:00 +0000 (18:56 +0200)]
staging: lustre: libcfs: Define pr_fmt() to include relevant name
Define a pr_fmt() for tracefile.c
Remove redundant prefix 'Lustre' from pr_*() calls.
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Narcisa Ana Maria Vasile [Sat, 18 Mar 2017 16:55:25 +0000 (18:55 +0200)]
staging: lustre: libcfs: Replace printk() with pr_*()
Convert printk() calls into corresponding pr_*() calls.
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérémy Lefaure [Tue, 21 Mar 2017 02:48:26 +0000 (22:48 -0400)]
staging: media: atomisp: fix build errors when PM is disabled
The function atomisp_restore_iumit_reg is unused when PM is disabled.
Adding __maybe_unused to the function definition avoids a warning.
The function atomisp_mrfld_power_down is defined only when PM is
enabled. So in atomisp_pci_probe, it should be called only when PM is
enabled.
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Tue, 21 Mar 2017 02:12:57 +0000 (11:12 +0900)]
staging: atomisp: remove useless condition in if-statements
The css_pipe_id was checked with 'CSS_PIPE_ID_COPY' in previous if-
statement. In this case, if the css_pipe_id equals to 'CSS_PIPE_ID_COPY',
it could not enter the next if-statement. But the "next" if-statement
has the condition to check whether the css_pipe_id equals to
'CSS_PIPE_ID_COPY' or not. It should be removed.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sun, 19 Mar 2017 12:36:24 +0000 (18:06 +0530)]
staging: media: atomisp: Remove unnecessary braces.
Remove braces which are not required to fix the check patch issue. The
following coccinelle script is used to fix this issue.
@@
expression e,e1;
@@
if(e)
-{
e1;
-}
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sun, 19 Mar 2017 12:33:13 +0000 (18:03 +0530)]
staging: media: atomisp: Remove unnecessary blank lines.
Remove multiple blank lines, which are not required. This patch fixes
the following check patch issue:
CHECK: Please don't use multiple blank lines
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sun, 19 Mar 2017 12:30:04 +0000 (18:00 +0530)]
staging: media: atomisp: Fix block comments warning.
Use kernel preferred block commenting style, to fix the checkpatch
issue.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sun, 19 Mar 2017 12:27:21 +0000 (17:57 +0530)]
staging: media: atomisp: Added spaces around arithmetic operators.
Add spaces around arithmetic operators (/, +, -), to fix the checkpatch
issue.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Zoran [Wed, 15 Mar 2017 00:01:25 +0000 (17:01 -0700)]
staging: bcm2835-audio: Add support for simultanous HDMI and Headphone audio
The firmware for the Raspberry PI already supports simultanous output
of audio through both the HDMI and the Headphone jack. The current
implementation of ALSA doesn't expose this well to user mode since
the firmware audio is represented as a single card.
A newer approach is taken here and a virtual card is created for each
output(HDMI, Headphones, and Traditional ALSA). The firmware has
the concept of channels or streams for which the number to use is
passed in the device tree. These streams are allocated to each of the
virtual cards.
As a side effect of this change, since each output is represented
independenly it's now very easy to use PulseAudio to control the
priorities of the outputs.
Testing:
Audacity and VLC were both loaded at the same time. Each application
was assigned to a different card. With this change I was able to play
different music files at the same time through the HDMI and Headphones
jacks and control the audio independently.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dave Stevenson [Tue, 14 Mar 2017 15:10:40 +0000 (08:10 -0700)]
bcm2835-v4l2: Fix buffer overflow problem
https://github.com/raspberrypi/linux/issues/1447
port_parameter_get() failed to account for the header
(u32 id and u32 size) in the size before memcpying
the response into the response buffer, so overrunning
the provided buffer by 8 bytes.
Account for those bytes, and also a belt-and-braces
check to ensure we never copy more than *value_size
bytes into value.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Tested-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 20 Mar 2017 09:35:28 +0000 (10:35 +0100)]
staging: vc04_services: make BCM_VIDEOCORE tristate
Adding the 'bool' symbol brought back a randconfig build bug that
I had fixed before:
drivers/staging/built-in.o: In function `vchiq_probe':
(.text+0x1da30): undefined reference to `rpi_firmware_get'
drivers/staging/built-in.o: In function `vchiq_platform_init':
(.text+0x27494): undefined reference to `rpi_firmware_property'
The problem is that when RASPBERRYPI_FIRMWARE is a loadable module,
but BCM2835_VCHIQ can again be built-in. Making BCM_VIDEOCORE
itself tristate will make Kconfig honor the dependency correctly.
Fixes: 6bbfe4a76158 ("staging: vc04_services: Create new BCM_VIDEOCORE setting for VideoCore services.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Mon, 20 Mar 2017 14:08:50 +0000 (14:08 +0000)]
staging: vc04_services: fix NULL pointer dereference on pointer 'service'
Currently, if pservice is null then service is set to NULL and immediately
afterwards service is dereferenced causing a null pointer dereference. Fix
this by bailing out early of the function with a null return.
Detected by CoverityScan, CID#
1419681 ("Explicit null dereferenced")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Mon, 20 Mar 2017 14:42:55 +0000 (14:42 +0000)]
staging: atomisp: simplify if statement in atomisp_get_sensor_fps()
If v4l2_subdev_call() gets the global frame interval values,
it returned 0 and it could be checked whether numerator is zero or not.
If the numerator is not zero, the fps could be calculated in this function.
If not, it just returns 0.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:42:41 +0000 (14:42 +0000)]
atomisp: remove a sysfs error message that can be used to log spam
Instead of logging this just report ERANGE as an error, which will give something close to the
right user space report.
The others of these were already removed by Dan Carpenter's patch.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Mon, 20 Mar 2017 14:42:23 +0000 (14:42 +0000)]
staging: atomisp: remove redudant condition in if-statement
The V4L2_FIELD_ANY is zero, so the (!field) is same meaning
with (field == V4L2_FIELD_ANY) in if-statement.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Mon, 20 Mar 2017 14:42:15 +0000 (14:42 +0000)]
staging: atomisp: remove else statement after return
It doesn't need to have else statement after return.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 20 Mar 2017 14:42:05 +0000 (14:42 +0000)]
staging/atomisp: add ACPI dependency
Without ACPI, some of the code fails to build:
media/atomisp/platform/intel-mid/atomisp_gmin_platform.c: In function 'atomisp_register_i2c_module':
media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:174:7: error: dereferencing pointer to incomplete type 'struct acpi_device'
We could work around that in the code, but since we already have a hard
dependency on x86, adding the ACPI dependency seems to be the easiest
solution.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 20 Mar 2017 14:41:55 +0000 (14:41 +0000)]
staging/atomisp: add PCI dependency
Without CONFIG_PCI, config space reads never return any data,
leading to undefined behavior that gcc warns about:
platform/intel-mid/intel_mid_pcihelpers.c: In function 'intel_mid_msgbus_read32_raw':
platform/intel-mid/intel_mid_pcihelpers.c:66:9: error: 'data' is used uninitialized in this function [-Werror=uninitialized]
platform/intel-mid/intel_mid_pcihelpers.c: In function 'intel_mid_msgbus_read32_raw_ext':
platform/intel-mid/intel_mid_pcihelpers.c:84:9: error: 'data' is used uninitialized in this function [-Werror=uninitialized]
platform/intel-mid/intel_mid_pcihelpers.c: In function 'intel_mid_msgbus_read32':
platform/intel-mid/intel_mid_pcihelpers.c:137:9: error: 'data' is used uninitialized in this function [-Werror=uninitialized]
With a dependency on CONFIG_PCI, we don't get this warning. This seems
safe as PCI config space accessors should always return something
when PCI is enabled.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 20 Mar 2017 14:41:47 +0000 (14:41 +0000)]
staging/atomisp: add VIDEO_V4L2_SUBDEV_API dependency
The driver fails to build if this is disabled, so we need an explicit
Kconfig dependency:
drivers/staging/media/atomisp/pci/atomisp2/./atomisp_cmd.c:6085:48: error: 'struct v4l2_subdev_fh' has no member named 'pad'
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 20 Mar 2017 14:41:38 +0000 (14:41 +0000)]
staging/atomisp: remove sh_css_lace_stat code
I ran into a build warning on my randconfig build box:
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c: In function 'ia_css_lace_statistics_free':
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:2845:64: error: parameter 'me' set but not used [-Werror=unused-but-set-parameter]
It turns out that not only the parameter is unused but the entire function has no
caller. Let's just remove it.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 20 Mar 2017 14:41:29 +0000 (14:41 +0000)]
stating/atomisp: fix -Wold-style-definition warning
ia_css_dequeue_param_buffers does not have an arguement type, causing a warning:
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c: In function 'ia_css_dequeue_param_buffers':
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:3728:6: error: old-style function definition [-Werror=old-style-definition]
This adds a 'void' keywork to silence the warning.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 20 Mar 2017 14:41:20 +0000 (14:41 +0000)]
staging/atomisp: fix empty-body warning
Defining a debug function to nothing causes a warning with an empty block
after if()/else():
drivers/staging/media/atomisp/i2c/ov2680.c: In function 'ov2680_s_stream':
drivers/staging/media/atomisp/i2c/ov2680.c:1208:55: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
This changes the empty debug statement to dev_dbg(), which by default also
does nothing, but avoids this warning and also checks the format string.
As a side-effect, we can now use dynamic debugging to turn on the
output at runtime.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérémy Lefaure [Mon, 20 Mar 2017 14:41:02 +0000 (14:41 +0000)]
staging: media: atomisp: add missing dependencies in Kconfig
Two dependencies were missing to build atomisp drivers:
_ MEDIA_CONTROLLER: to use the entity field of v4l2_subdev structure. Since
every atomisp driver needs MEDIA_CONTROLLER has a dependency, let's add it
to INTEL_ATOMISP
_ EFI: to use efivar_entry_get:
drivers/built-in.o: In function `gmin_get_config_var':
(.text+0xe062b): undefined reference to `efivar_entry_get'
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérémy Lefaure [Mon, 20 Mar 2017 14:40:50 +0000 (14:40 +0000)]
staging: media: atomisp: select REGMAP_I2C needed by ap1302.c
REGMAP_I2C should be enabled to build the driver ap1302 because it uses
regmap functions.
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Mon, 20 Mar 2017 14:40:41 +0000 (14:40 +0000)]
Staging: atomisp: fix an uninitialized variable bug
There are some error paths in atomisp_css_frame_allocate() which don't
initialize "res" so it could lead us to try release random memory.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Mon, 20 Mar 2017 14:40:32 +0000 (14:40 +0000)]
Staging: atomisp: fix locking in alloc_user_pages()
We call this function with the lock held and should also return with the
lock held as well. This one error path is not-consistent because we
should return without the lock held.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:40:20 +0000 (14:40 +0000)]
atomisp: remove another pair of 2400/2401 differences
The first of these checks the PCI identifier in order to decide what to do so needs no
ifdef. The other is simply a variation on what is dumped for debug - so favour dumping the
most.
Signed-off-by Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:40:06 +0000 (14:40 +0000)]
atomisp/imx: Fix locking bug on error path
This was reported by Dan Carpenter. When we error with an IMX 227 we don't release
the lock and the sensor would then hang.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:39:21 +0000 (14:39 +0000)]
atomisp: ia_css_bh_hmem_encode is a no-op so remove it
This is a do nothing function so we can replace it with nothing and eliminate it entirely.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:38:59 +0000 (14:38 +0000)]
atomisp: remove another layer of allocator indirection
Our driver only ever uses one set of routines for the allocators used by the CSS layer to
manage memory and the memory management on the ISP. We can thus remove the function vectors
and simply call the intended routines directly.
These routines in turn are simply wrappers around another layer of code so remove this
second layer of wrappers and call the hrt methods directly. In time we can remove this layer
of indirection as well.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:38:42 +0000 (14:38 +0000)]
atomisp: remove the unused debug wrapping from the mmgr layer
We don't need this layer of indirection and the debugging information is not used. With
this removed we can then go on to try and remove the abstraction layer entirely.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:38:27 +0000 (14:38 +0000)]
atomisp: remove aa kernel wrappers
The aa kernel is used but it consists of nothing more than a set of wrappers
for a memset and an assignment. Replace these at the calling points with the
memset and assignment.
Keep the structures for now - those should disappear as the next layer up
gets unwrapped.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:38:13 +0000 (14:38 +0000)]
atomisp: remove the iefd2 kernel
While this is included and the headers pulled in nothing actually uses this
functionality in the driver, so remove it.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:27 +0000 (11:27 -0400)]
staging: unisys: include: channel.h: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:26 +0000 (11:27 -0400)]
staging: unisys: include: visorbus.h: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:25 +0000 (11:27 -0400)]
staging: unisys: include: iochannel.h: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:24 +0000 (11:27 -0400)]
staging: unisys: visorhba: visorhba_main.c: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:23 +0000 (11:27 -0400)]
staging: unisys: visorinput: visorinput.c: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:22 +0000 (11:27 -0400)]
staging: unisys: visorbus: vmcallinterface.h: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:21 +0000 (11:27 -0400)]
staging: unisys: visorbus: vbuschannel.h: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:20 +0000 (11:27 -0400)]
staging: unisys: visorbus: visorchipset.c: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:19 +0000 (11:27 -0400)]
staging: unisys: visorbus: controlvmchannel.h: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:18 +0000 (11:27 -0400)]
staging: unisys: visorbus: visorbus_main.c: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:17 +0000 (11:27 -0400)]
staging: unisys: visorbus: visorchannel.c: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jon Frisch [Fri, 17 Mar 2017 15:27:16 +0000 (11:27 -0400)]
staging: unisys: visorbus: remove #pragma directive
This patch removes the #pragma directive from visorchannel.h
and adds the __packed keyword to all structs to suppress structure
padding.
Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jon Frisch [Fri, 17 Mar 2017 15:27:15 +0000 (11:27 -0400)]
staging: unisys: visornic: remove inline functions
This patch removes inline functions in visornic_main.c.
Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jon Frisch [Fri, 17 Mar 2017 15:27:14 +0000 (11:27 -0400)]
staging: unisys: include: remove irrelevant comments
This patch removes comments that are no longer relevant
in channel.h.
Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jon Frisch [Fri, 17 Mar 2017 15:27:13 +0000 (11:27 -0400)]
staging: unisys: include: removed unused function declarations
This patch removes the unused function declarations
in channel.h.
Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jon Frisch [Fri, 17 Mar 2017 15:27:12 +0000 (11:27 -0400)]
staging: unisys: include: remove macro lengthof
This patch removes the unused macro lengthof.
Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:11 +0000 (11:27 -0400)]
staging: unisys: visorbus: Remove pointer cast that causes sparse warning
Removes unnecessary cast of to __iomem of a non-io-mapped pointer, thereby
eliminating the following sparse warning:
visorchannel.c:159:17: warning: cast adds address space to expression (<asn:2>)
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Fri, 17 Mar 2017 15:27:10 +0000 (11:27 -0400)]
staging: unisys: include: simplify spar_check_channel_client
The function spar_check_channel_client shouldn't need to do
readq's, it is referencing a local copy of the channel
header. Simplify it to just access the fields directly.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:09 +0000 (11:27 -0400)]
staging: unisys: include: Add function definition argument identifier
Adds identifier to function definition arguments to satisfy checkpatch
warnings:
WARNING: function definition argument 'struct visor_driver *' should also
have an identifier name
WARNING: function definition argument 'struct visor_driver *' should also
have an identifier name
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:08 +0000 (11:27 -0400)]
staging: unisys: visorinput: Remove unnecessary usage of local variable
Remove local variable on stack by directly returning the value in the
array.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:07 +0000 (11:27 -0400)]
staging: unisys: visorbus: Rename what vmcallinterface.h #define
Renames __IOMONINTF_H__ to __VMCALLINTERFACE_H__, which more closely
reflects the naming conventions of the code.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:06 +0000 (11:27 -0400)]
staging: unisys: visornic: Move function to appropriate location
Move function add_physinfo_entries() to visornic_main.c, which is the
only function where it is used.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:05 +0000 (11:27 -0400)]
staging: unisys: include: Change out-of-date references
Replace references to virtpci to visornic in iochannel.h.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:04 +0000 (11:27 -0400)]
staging: unisys: visorbus: Rename #define VMCALL_IO_CONTROLVM_ADDR
Rename #define VMCALL_IO_CONTROLVM_ADDR to VMCALL_CONTROLVM_ADDR, as this
vmcall can be used by any partition, not just the IO partition.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:03 +0000 (11:27 -0400)]
staging: unisys: visorbus: Remove useless checks in visorbus_main.c
Removes checks that all visor_device instances have an associated
visorchannel. Due to the design of the s-Par drivers these checks are
unnecessary.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:02 +0000 (11:27 -0400)]
staging: unisys: include: Remove unused visorchannel #defines
Removes unused #defines pertaining to visorchannel UUIDs.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:01 +0000 (11:27 -0400)]
staging: unisys: include: Wrap macro argument in parenthesis
Addresses checkpatch check by wrapping macro argument in parenthesis.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:27:00 +0000 (11:27 -0400)]
staging: unisys: visorbus: remove inline keyword in visorchannel.c
Removed inline keyword from functions sig_read_data and
sig_write_data in visorchannel.c
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:26:59 +0000 (11:26 -0400)]
staging: unisys: visorbus: remove inline keyword from visorchipset
Removed inline keyword from the functions in visorchipset:
* issue_vmcall_io_controlvm_addr()
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:26:58 +0000 (11:26 -0400)]
staging: unisys: visorhba: remove inline keyword
Removed inline keyword from the function complete_taskmgmt_command
in visorhba_main.c
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:26:57 +0000 (11:26 -0400)]
staging: unisys: visorbus: remove unused functions in visorchipset
Removed unused functions issue_vmcall_update_physical_time() and
issue_vmcall_query_guest_virtual_time_offset() from visorchipset.c
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:26:56 +0000 (11:26 -0400)]
staging: unisys: include: remove unused macro spar_signal_init
Removed unused macro spar_signal_init from channel.h
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:26:55 +0000 (11:26 -0400)]
staging: unisys: include: remove unused function spar_check_channel_server
Removed unused function spar_check_channel_server from channel.h
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:26:54 +0000 (11:26 -0400)]
staging: unisys: visorbus: removed unused structure pci_id
Removed unused structure pci_id from controlvmchannel.h
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Curtin [Fri, 17 Mar 2017 15:26:53 +0000 (11:26 -0400)]
staging: unisys: visorbus_main: removed revference to virtpci
The comment referencing virtpci was irrelevant.
Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Curtin [Fri, 17 Mar 2017 15:26:52 +0000 (11:26 -0400)]
staging: unisys: include: replaced COVERQ with DIV_ROUND_UP
COVERQ is functionally equivalent to DIV_ROUND_UP and was only used
to define the COVER macro.
Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gargi Sharma [Fri, 17 Mar 2017 07:59:30 +0000 (13:29 +0530)]
staging: iio: ad7280: Replace mlock with driver private lock
The IIO subsystem is redefining iio_dev->mlock to be used by
the IIO core only for protecting device operating mode changes.
ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes.
In this driver, mlock was being used to protect hardware state
changes. Replace it with a lock in the devices global data.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Miguel Robles [Thu, 16 Mar 2017 14:28:29 +0000 (15:28 +0100)]
Staging: iio: resolver: ad2s1210: Fix warning, statements should start on a tabstop
Fix checkpatch warning:
Statements should start on a tabstop.
Signed-off-by: Miguel Robles <miguel.robles@farole.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Miguel Robles [Thu, 16 Mar 2017 13:02:19 +0000 (14:02 +0100)]
Staging: iio: cdc: ad7746: use octal permissions instead of symbolic
Fix checkpatch warnings:
Symbolic permissions 'S_IWUSR' are not preferred.
Signed-off-by: Miguel Robles <miguel.robles@farole.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Narcisa Ana Maria Vasile [Wed, 15 Mar 2017 17:00:14 +0000 (19:00 +0200)]
staging: iio: adis16209: Remove mutex_lock() and mutex_unlock() calls
The function adis16209_read_raw() is safe to be run in parallel.
The call to adis_read_reg_16() is safe since adis_read_reg() uses the
txrx_lock from struct adis to protect simultaneous changes.
Remove mutex.h inclusion since it is no longer needed.
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>