Commit graph

616420 commits

Author SHA1 Message Date
Tim Sell
8dfb8fdbd2 staging: unisys: visorinput: make lock_visor_dev a mutex
Since lock_visor_dev is a binary semaphore it makes more sense to
use a mutex lock.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:26 +02:00
Tim Sell
24ce1b6661 staging: unisys: visorinput: ensure proper locking wrt creation & ints
Ensure we properly lock between visorinput_channel_interrupt(),
visorinput_open(), and devdata_create().  We now guarantee that:

* interrupts will be disabled and remain disabled during device creation,
  by setting 'paused = true' across device creation

* we canNOT get into visorinput_open() until the device structure is
  totally initialized, by delaying the input_register_device() until the
  end of device initialization

We also now ensure that lock_visor_dev is held across updates of devdata
state, to ensure state consistency.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:26 +02:00
David Kershner
64088bd476 staging: unisys: Move vbushelper.h to visorbus directory
Only visorbus needs this header file so move it to visorbus
directory.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:26 +02:00
Tim Sell
90bb5c1f27 staging: unisys: visorbus: fix visorbus_private.h comments
This patch ONLY touches comment lines, i.e., NO executable code is
affected.

Comments were fixed in visorbus_private.h:
* Minor typos were corrected.
* Useless comments were removed.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:26 +02:00
David Binder
ea3a5aafe0 staging: unisys: visorbus: Rename function to follow existing convention
Renames visorchipset_device_pause_response to device_pause_response,
thereby following the convention that other responder functions follow.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:26 +02:00
David Binder
87241ab859 staging: unisys: visorbus: Remove notifier-related code from visorbus
When this functionality was first implemented, visorchipset and visorbus
were separate drivers, which necessitated a registration mechanism for
them to communicate.  More-recently, visorchipset and visorbus were
combined into a single driver, and now exist as separate source files
within the same driver, known as 'visorbus'.  This eliminated the need
for a registration mechanism, but it has remained nevertheless until now.
For the sake of simplification, this registration mechanism is now being
removed.

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>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:25 +02:00
David Binder
eafc6a94e9 staging: unisys: visorbus: rectify kerneldoc comment for struct
Fixes the kerneldoc comment for struct visor_device - the struct members
were not listed with the appropriate @ prefix.

Signed-off-by: David Binder <david.binder@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:25 +02:00
David Binder
e9b18f3b86 staging: unisys: visorbus: Move visorbus-unique functions to private header
Moves function prototypes that are unique to visorbus from
include/visorbus.h to visorbus/visorbus_private.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>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:25 +02:00
David Binder
ec17f452f4 staging: unisys: visorbus: Rectify commenting in visorchipset.c
Adds kerneldoc formatting to appropriate functions. Other multi-line
comments now use proper formatting.

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>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:25 +02:00
David Binder
e19674ceb6 staging: unisys: visorbus: fix visorchannel.c comments
This patch ONLY touches comment lines, i.e., NO executable code is
affected.

Comments were fixed in visorchannel.c:
* All functions worthy of documenting now use standard kerneldoc
  formatting.
* Multi-line comments were tweaked so as to use appropriate conventions.
* Minor typos were corrected.
* Useless comments were removed.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: David Binder <david.binder@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:25 +02:00
David Binder
3fd1b3b682 staging: unisys: visorbus: fix commenting in visorbus_main.c
This patch ONLY touches comment lines, i.e., NO executable code is
affected.

* All functions worthy of documenting now use standard kerneldoc
  formatting.
* Improper uses of kerneldoc formatting were converted to standard
  multi-line comments.
* Multi-line comments were tweaked so as to use appropriate conventions.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:25 +02:00
David Binder
0048be9e1e staging: unisys: visorbus: fix commenting in vbusdevinfo.h
This patch ONLY touches comment lines, i.e., NO executable code is
affected.

* All functions worthy of documenting now use standard kerneldoc
  formatting.
* Multi-line comments were tweaked so as to use appropriate conventions.
* Minor typos were corrected.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:25 +02:00
Tim Sell
93e59bfc3b staging: unisys: visorbus: remove unused parameter from function
The off parameter to visorchannel_create_guts() was never used, so it was
removed.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:25 +02:00
Bryan Thompson
5f084e278f staging: unisys: Remove reference to unused STANDALONE_CLIENT
The STANDALONE_CLIENT define is no longer used by Unisys driver code.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:25 +02:00
Bryan Thompson
33f3a3cfac staging: unisys: visorbus: Remove unused functions
Remove visorbus_clear_channel, visorchannel_signalqueue_slots_avail,
visorchannel_signalqueue_max_slots, visorchannel_clear, and
visorchannel_debug which are no longer called by any driver.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:25 +02:00
Bryan Thompson
fe129f6216 staging: unisys: visorbus: Remove unnecessary EXPORT_SYMBOL statements
The driver that is now visorbus started out as multiple separate drivers,
and when they were merged the EXPORT_SYMBOL statements that were required
for separate drivers were left in the code. This patch removes those now
unnecessary exports.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:25 +02:00
Bryan Thompson
d505855e5f staging: unisys: visorbus: Make visordriver_callback_lock a mutex
visordriver_callback_lock is just a binary semaphore that logically
makes more sense as a mutex.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:25 +02:00
Tim Sell
8a64f954a8 staging: unisys: visorbus: remove periodic_work.h/.c
These files were made no-longer-necessary by recent commits.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:25 +02:00
Tim Sell
9ebab64952 staging: unisys: visorbus: use kernel timer instead of workqueue
A kernel timer is now used as the vehicle to periodically call the
channel_interrupt function of registered visor drivers, instead of a
workqueue.

This simplifies a lot of things by making periodic_work.c and
periodic_work.h no longer necessary.  This change also means that the
channel_interrupt() callbacks registered by visor drivers (via
visorbus_register_visor_driver()) will now be called in atomic context
(i.e., canNOT sleep) rather than kernel thread context (CAN sleep).
Fortunately this did NOT necessitate any change to the existing
channel_interrupt() callbacks, because none of them ever perform any
operations that would be invalid in atomic context.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:24 +02:00
Tim Sell
83011b6cbe staging: unisys: visorinput: remove unnecessary locking
Locking in the _interrupt() function is NOT necessary so long as we ensure
that interrupts have been stopped whenever we need to pause or resume the
device, which we now do.

While a device is paused, we ensure that interrupts stay disabled, i.e.
that the _interrupt() function will NOT be called, yet remember the desired
state in devdata->interrupts_enabled if open() or close() are called are
called while the device is paused.  Then when the device is resumed, we
restore the actual state of interrupts (i.e., whether _interrupt() is going
to be called or not) to the desired state in devdata->interrupts_enabled.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:24 +02:00
Tim Sell
c3d4a97033 staging: unisys: visorbus: removed unused periodic_test_workqueue
periodic_test_workqueue was an unused relic from the past, and was removed.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:24 +02:00
David Binder
e54d0a3023 staging: unisys: include: Remove thread-related enum members
Code relating to ktheads was previously removed from s-Par driver code.
This patch cleans up lingering remnants of kthreads by removing thread-
related enum types.

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>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:24 +02:00
David Binder
ab30126587 staging: unisys: visornic: Correct comment spelling mistake
Fixes a comment spelling mistake in visornic.

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>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:24 +02:00
David Binder
7f71e48cad staging: unisys: visorbus: modify format string to match argument
Modifies the format string of snprintf to expect an unsigned int
instead of a signed one, per the supplied argument.

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>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:24 +02:00
David Binder
cc9b8ed99e staging: unisys: visorbus: remove unused struct
Removes unused struct definition, channel_size_info, in response to
findings by SonarQube.

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>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:24 +02:00
David Binder
f4211d1a6b staging: unisys: visorbus: remove unused module parameters
Removes unused module parameters from visorbus_main.c, in response to
findings by SonarQube.

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>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:24 +02:00
Erik Arfvidson
80224f064e staging: unisys: visorbus: check parahotplug_request_complete_result
This patch modifies the caller of parahotplug_request_complete()
to check the return value and return appropriate result.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:24 +02:00
Erik Arfvidson
ff13cf37fa staging: unisys: visorbus: remove return values for write_vbus functions
This patch removes the return values from the write_vbus_* channel
functions. Nobody was checking the return values and the value stored
into the vbus info is not critical to the functioning of the device.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:44:24 +02:00
Christian Gromm
ec7e0a189b staging: most: hdm-usb: reduce context of list_del mutex
This patch reduces context of the list_del mutex for the function
hdm_enqueue().

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:36:47 +02:00
Christian Gromm
99d753463a staging: most: core: rename device struct of core module
This patch gives the struct device variable of the core a more meaningful
name.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:23:21 +02:00
Christian Gromm
5a63e23a29 staging: most: core: remove debug print
This patch removes the debug print in case an HDM ran out of rx buffers.
This is not needed since the status is reflected in the sysfs
channel_starving flag. Additionally, it prevents the system form slowing
down.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:23:21 +02:00
Christian Gromm
1c88f8ff42 staging: most: dim2-hdm: fix possible kernel freeze when reusing a dim2 channel
If a DIM2 channel is being closed while it is busy, the channels's status
flag could possibly stay active for this very channel. This causes the
kernel to freeze by the time the channel is opened again.

This patch fixes the problem.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:18:56 +02:00
Christian Gromm
63c87669c4 staging: most: dim2-hdm: add configuration for fcnt
This patch adds possibility to configure the DIM2-IP parameter
representing the number of frames per sub-buffer for synchronous
channels.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:18:56 +02:00
Christian Gromm
6ebb3727ea staging: most: dim2-hdm: fix race condition when closing a channel
This patch fixes race between the function poison_channel that clears
the state is_initialized and the tasklet function dim2_tasklet_fn that
checks the state is_initialized.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 20:18:55 +02:00
Christian Gromm
908614be16 staging: most: v4l2-aim: remove unnecessary spaces
This patch removes the unnecessary spaces.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:17:04 +02:00
Christian Gromm
eab231c039 staging: most: v4l2-aim: remove unnecessary label err_vbi_dev
For optimization purposes this patch removes the label err_vbi_dev.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:17:04 +02:00
Christian Gromm
b23e8e51e6 staging: most: v4l2-aim: remove unnecessary retval
The function aim_register_videodev() uses the variables 'ret' and
'retval' to represent the same value.

This patch removes 'retval' and replaces it with 'ret'. Further, it
replaces the constant return value '-ENODEV' with the result returned by
function video_register_device() in the event something went wrong.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:17:04 +02:00
Christian Gromm
8f6f9ed15d staging: most: v4l2-aim: replace pr_xx calls by v4l2_xx calls
This patch replaces pr_info, pr_err, etc. function calls by the
v4l2_... ones to get the device dependent logs.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:17:04 +02:00
Christian Gromm
323977d5d3 staging: most: v4l2-aim: assign unique names to devices
The current V4L2 AIM implementation assigns to all video devices and to
all V4L devices the same names.

This patch makes use of hardware dependent names for the video devices and
allows the user to choose the names for the V4L devices.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:17:04 +02:00
Christian Gromm
db5a48d595 staging: most: v4l2-aim: optimize list_for_each_entry_safe
As the function get_aim_dev() does not delete elements of the list, the
use of macro list_for_each_entry_safe is not necessary.

This patch replaces the macro list_for_each_entry_safe with the macro
list_for_each_entry.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:17:03 +02:00
Christian Gromm
e494df039d staging: most: v4l2-aim: fix interrupt unsafe spinlocks
The functions get_aim_dev() and aim_rx_data() are using interrupt unsafe
spinlocks even though they may be called from an interrupt context.

This patch fixes the described problem.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:17:03 +02:00
Colin Ian King
99a9ffacc1 staging: speakup: ensure we do not overrun synths array
synth_add allows one to add MAXSYNTHS synths to the synths array;
however it always NULLifies the next synth in the array which
means that on the MAXSYNTHS synth we get an out-of-bounds write of
the NULL to the synths array.  Make the synths array MAXSYNTHS + 1
elements in size to allow for the final NULL sentinal to avoid the
out-of-bounds write.

Issue found wit CoverityScan, CID#744671

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:14:54 +02:00
Laurence Rochfort
b6ed5a233a Staging: speakup: Remove space after cast
Fix the checkpatch.pl warning "No space is necessary after a cast".

Signed-off-by: Laurence Rochfort <laurence.rochfort@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:14:53 +02:00
Daeseok Youn
4875bb884e staging: dgnc: remove useless variable 'ch_intr_rx'
The 'ch_intr_rx' variable was used only for increasing.
So the 'ch_intr_rx' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:26 +02:00
Daeseok Youn
2c7d924e28 staging: dgnc: remove useless variable 'ch_intr_tx'
The 'ch_intr_tx' variable was used only for increasing.
So the 'ch_intr_tx' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:26 +02:00
Daeseok Youn
74c900f5e9 staging: dgnc: remove useless variable 'ch_intr_modem'
The 'ch_intr_modem' variable was used only for increasing.
So the 'ch_intr_modem' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:26 +02:00
Daeseok Youn
572f4f61cd staging: dgnc: remove useless variable 'intr_rx'
The 'intr_rx' variable was used only for increasing.
So the 'intr_rx' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:26 +02:00
Daeseok Youn
262c5e1bab staging: dgnc: remove useless variable 'intr_tx'
The 'intr_tx' variable was used only for increasing.
So the 'intr_tx' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:26 +02:00
Daeseok Youn
ca0d0b889c staging: dgnc: remove unused variable 'intr_modem'
The 'intr_modem' variable was used only for increasing.
So the 'intr_modem' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:25 +02:00
Daeseok Youn
14ad516511 staging: dgnc: remove redundant null check in
the "brd" was already checked for NULL before calling dgnc_do_remap().

the dgnc_do_remap() function was called only
from the dgnc_found_board() and the DGNC_BOARD_MAGIC value
was assigned to "brd->magic" in dgcn_found_board(). So it doesn't
need to check about magic value.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:25 +02:00