platform/kernel/linux-exynos.git
9 years agostaging: Remove logger and alarm-dev from android Makefile
John Stultz [Tue, 27 Jan 2015 15:22:21 +0000 (07:22 -0800)]
staging: Remove logger and alarm-dev from android Makefile

My previous patches deleting logger and alarm-dev from staging
missed the android Makefile.

This patch cleans up the Makefile to remove the now non-existent
files.

Cc: Rom Lemarchand <romlem@google.com>,
Cc: Mark Salyzyn <salyzyn@google.com>,
Cc: Kees Cook <keescook@chromium.org>,
Cc: Android Kernel Team <kernel-team@android.com>,
Cc: Valentin Rothberg <valentinrothberg@gmail.com>,
Cc: Greg Hackmann <ghackmann@google.com>,
Cc: Elliott Hughes <enh@google.com>,
Cc: Todd Poynor <toddpoynor@google.com>,
Reported-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: Remove the Android logger driver
John Stultz [Mon, 26 Jan 2015 20:07:32 +0000 (12:07 -0800)]
staging: Remove the Android logger driver

With the relase of Lollipop, Android no longer
requires the logger driver.

There are three patches which the android dev's
still need before they drop logger on all their
devices:

[PATCH v4 1/5] pstores: use scnprintf
[PATCH v2 2/5] pstore: remove superfluous memory size check
[PATCH 3/5] pstore: handle zero-sized prz in series
[PATCH v4 4/5] pstore: add pmsg
[PATCH 5/5] pstore: selinux: add security in-core xattr support for pstore and debugfs

But these seem to have been acked and are hopefully
queued for upstream.

So this patch removes the logger driver from staging.

Cc: Rom Lemarchand <romlem@google.com>,
Cc: Mark Salyzyn <salyzyn@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: remove redundant .owner
Heba Aamer [Wed, 28 Jan 2015 13:29:05 +0000 (15:29 +0200)]
staging: fbtft: remove redundant .owner

This patch fixes the following coccicheck warning:
No need to set .owner here. The core will do it.

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix trailing whitespace
Heba Aamer [Tue, 27 Jan 2015 20:46:25 +0000 (22:46 +0200)]
staging: fbtft: fix trailing whitespace

This patch fixes the following checkpatch.pl error:
fix trailing whitespace

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix do not initialise statics to 0 or NULL
Heba Aamer [Tue, 27 Jan 2015 20:42:59 +0000 (22:42 +0200)]
staging: fbtft: fix do not initialise statics to 0 or NULL

This patch fixes the following checkpatch.pl error:
fix do not initialise statics to 0 or NULL

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix Macros with complex values should be enclosed in parentheses
Heba Aamer [Tue, 27 Jan 2015 20:39:56 +0000 (22:39 +0200)]
staging: fbtft: fix Macros with complex values should be enclosed in parentheses

This patch fixes the following checkpatch.pl error:
fix Macros with complex values should be enclosed in parentheses

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix spaces required around that '<'
Heba Aamer [Tue, 27 Jan 2015 20:37:24 +0000 (22:37 +0200)]
staging: fbtft: fix spaces required around that '<'

This patch fixes the following checkpatch.pl error:
fix spaces required around that '<'

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix spaces required around that '='
Heba Aamer [Tue, 27 Jan 2015 20:35:30 +0000 (22:35 +0200)]
staging: fbtft: fix spaces required around that '='

This patch fixes the following checkpatch.pl error:
fix spaces required around that '='

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix space required after that ';'
Heba Aamer [Tue, 27 Jan 2015 20:33:03 +0000 (22:33 +0200)]
staging: fbtft: fix space required after that ';'

This patch fixes the following checkpatch.pl error:
fix space required after that ';'

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers/staging: use current->state helpers
Davidlohr Bueso [Mon, 26 Jan 2015 10:15:02 +0000 (02:15 -0800)]
drivers/staging: use current->state helpers

Call __set_current_state() instead of assigning the new state directly.
These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments,
keeping track of who changed the state.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: fix that open brace { should be on the previous line
Mariam Mohamed Fawzy [Mon, 26 Jan 2015 09:24:36 +0000 (11:24 +0200)]
staging: vt6655: fix that open brace { should be on the previous line

This patch fixes the following checkpatch.pl error:
fix that open brace { should be on the previous line

Signed-off-by: Mariam Mohamed Fawzy <maryammohamed61@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: flexfb: Remove initialization to 0
Mauro Stettler [Sun, 25 Jan 2015 11:26:17 +0000 (20:26 +0900)]
staging: flexfb: Remove initialization to 0

(the initial post had a typo in the short summary, reposting)

This fixes some of the code style issues in the flexfb driver by removing
unnecessary initializations of static variables to 0 or to NULL.

Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_compat32.c: absorb raw_ioctl()
Ian Abbott [Tue, 27 Jan 2015 18:16:56 +0000 (18:16 +0000)]
staging: comedi: comedi_compat32.c: absorb raw_ioctl()

`comedi_compat_ioctl()` just calls static inline function `raw_ioctl()`
with the same parameters (although the former returns a `long` and the
latter returns an `int`).  Since `raw_ioctl()` is not called from
anywhere else, just absorb its body into `comedi_compat_ioctl()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_compat32.c: align some comments
Ian Abbott [Tue, 27 Jan 2015 18:16:55 +0000 (18:16 +0000)]
staging: comedi: comedi_compat32.c: align some comments

Align some comments attached to members of the 32-bit compatibility
structure definitions.  These comments describe the original pointer
types that are being represented by a `compat_uptr_t`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_compat32.c: reformat other block comments
Ian Abbott [Tue, 27 Jan 2015 18:16:54 +0000 (18:16 +0000)]
staging: comedi: comedi_compat32.c: reformat other block comments

Use the usual block comment style.  Combine some consecutive comments
into block comments.  Also remove part of a comment referring to
`ptr_to_compat()` not being implemented until kernel version 2.6.11 as
it's irrelevant.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_compat32.c: reformat copyright comment
Ian Abbott [Tue, 27 Jan 2015 18:26:55 +0000 (18:26 +0000)]
staging: comedi: comedi_compat32.c: reformat copyright comment

Use the usual block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_compat32.h: reformat copyright comment
Ian Abbott [Tue, 27 Jan 2015 18:16:52 +0000 (18:16 +0000)]
staging: comedi: comedi_compat32.h: reformat copyright comment

Use the usual block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_compat32.c: fix COMEDI_CMD copy back
Ian Abbott [Tue, 27 Jan 2015 18:16:51 +0000 (18:16 +0000)]
staging: comedi: comedi_compat32.c: fix COMEDI_CMD copy back

`do_cmd_ioctl()` in "comedi_fops.c" handles the `COMEDI_CMD` ioctl.
This returns `-EAGAIN` if it has copied a modified `struct comedi_cmd`
back to user-space.  (This occurs when the low-level Comedi driver's
`do_cmdtest()` handler returns non-zero to indicate a problem with the
contents of the `struct comedi_cmd`, or when the `struct comedi_cmd` has
the `CMDF_BOGUS` flag set.)

`compat_cmd()` in "comedi_compat32.c" handles the 32-bit compatible
version of the `COMEDI_CMD` ioctl.  Currently, it never copies a 32-bit
compatible version of `struct comedi_cmd` back to user-space, which is
at odds with the way the regular `COMEDI_CMD` ioctl is handled.  To fix
it, change `compat_cmd()` to copy a 32-bit compatible version of the
`struct comedi_cmd` back to user-space when the main ioctl handler
returns `-EAGAIN`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_usb.h: move USB stuff out of comedidev.h
Ian Abbott [Tue, 27 Jan 2015 17:49:09 +0000 (17:49 +0000)]
staging: comedi: comedi_usb.h: move USB stuff out of comedidev.h

Move the USB-specific stuff out of "comedidev.h" into "comedi_usb.h".
Comedi USB drivers now include "comedi_usb.h" instead of "comedidev.h",
which now gets pulled in indirectly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: vmk80xx: include new "comedi_usb.h" header
Ian Abbott [Tue, 27 Jan 2015 17:49:08 +0000 (17:49 +0000)]
staging: comedi: vmk80xx: include new "comedi_usb.h" header

Include the new "../comedi_usb.h" header instead of <linux/usb.h> and
"../comedidev.h", which will now get included indirectly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: usbduxsigma: include new "comedi_usb.h" header
Ian Abbott [Tue, 27 Jan 2015 17:49:07 +0000 (17:49 +0000)]
staging: comedi: usbduxsigma: include new "comedi_usb.h" header

Include the new "../comedi_usb.h" header instead of <linux/usb.h> and
"../comedidev.h", which will now get included indirectly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: usbduxfast: include new "comedi_usb.h" header
Ian Abbott [Tue, 27 Jan 2015 17:49:06 +0000 (17:49 +0000)]
staging: comedi: usbduxfast: include new "comedi_usb.h" header

Include the new "../comedi_usb.h" header instead of <linux/usb.h> and
"../comedidev.h", which will now get included indirectly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: usbdux: include new "comedi_usb.h" header
Ian Abbott [Tue, 27 Jan 2015 17:49:05 +0000 (17:49 +0000)]
staging: comedi: usbdux: include new "comedi_usb.h" header

Include the new "../comedi_usb.h" header instead of <linux/usb.h> and
"../comedidev.h", which will now get included indirectly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_usb6501: include new "comedi_usb.h" header
Ian Abbott [Tue, 27 Jan 2015 17:49:04 +0000 (17:49 +0000)]
staging: comedi: ni_usb6501: include new "comedi_usb.h" header

Include the new "../comedi_usb.h" header instead of <linux/usb.h> and
"../comedidev.h", which will now get included indirectly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: dt9812: include new "comedi_usb.h" header
Ian Abbott [Tue, 27 Jan 2015 17:49:03 +0000 (17:49 +0000)]
staging: comedi: dt9812: include new "comedi_usb.h" header

Include the new "../comedi_usb.h" header instead of <linux/usb.h> and
"../comedidev.h", which will now get included indirectly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_usb.c: include new "comedi_usb.h" header
Ian Abbott [Tue, 27 Jan 2015 17:49:02 +0000 (17:49 +0000)]
staging: comedi: comedi_usb.c: include new "comedi_usb.h" header

Include the new "comedi_usb.h" header instead of <linux/usb.h> and
"comedidev.h", which will now get included indirectly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: add comedi_usb.h
Ian Abbott [Tue, 27 Jan 2015 17:49:01 +0000 (17:49 +0000)]
staging: comedi: add comedi_usb.h

Add a new header that Comedi USB drivers can include instead of
"comedidev.h".  Currently, it just pulls in <linux/usb.h> and
"comedidev.h", but the plan is to migrate the USB-specific stuff from
"comedidev.h" here.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcl812: fix logic error in pcl812_ai_setup_dma()
H Hartley Sweeten [Mon, 26 Jan 2015 21:20:15 +0000 (14:20 -0700)]
staging: comedi: pcl812: fix logic error in pcl812_ai_setup_dma()

commit 92afc2b229038d7b962ae69de5b07bc6c1cf51bf inroduced a logic error
in the DMA size calculation.

If the 'nsamples' is greater than the 'unread_samples' then DMA needs to
be restarted. The current code checks it agains the 'max_samples'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: addi_apci_1032: add comedi driver comment
Ian Abbott [Mon, 26 Jan 2015 14:28:56 +0000 (14:28 +0000)]
staging: comedi: addi_apci_1032: add comedi driver comment

Add a comedi driver comment in a form suitable for importing into
Comedilib documentation.  The information about the change-of-state
subdevice has been pulled from other comments in the driver.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: 8255.h: reformat copyright comment
Ian Abbott [Mon, 26 Jan 2015 13:25:25 +0000 (13:25 +0000)]
staging: comedi: 8255.h: reformat copyright comment

Use the usual block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: 8255.c: reformat remaining block comments
Ian Abbott [Mon, 26 Jan 2015 13:25:24 +0000 (13:25 +0000)]
staging: comedi: 8255.c: reformat remaining block comments

Use the usual block comment formatting style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: 8255.c: document subdev_8255_init() and _mm_init()
Ian Abbott [Mon, 26 Jan 2015 13:25:23 +0000 (13:25 +0000)]
staging: comedi: 8255.c: document subdev_8255_init() and _mm_init()

Add kerneldoc comments for the subdev_8255_init() and
subdev_8255_mm_init() functions and remove the other comment about how
to use this module in a comedi driver.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: 8255.c: reformat comedi driver comment
Ian Abbott [Mon, 26 Jan 2015 13:25:22 +0000 (13:25 +0000)]
staging: comedi: 8255.c: reformat comedi driver comment

Use the usual block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: 8255.c: reformat copyright comment
Ian Abbott [Mon, 26 Jan 2015 13:25:21 +0000 (13:25 +0000)]
staging: comedi: 8255.c: reformat copyright comment

Use the usual block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: 8253.h: use usual style for single-line comments
Ian Abbott [Mon, 26 Jan 2015 12:06:07 +0000 (12:06 +0000)]
staging: comedi: 8253.h: use usual style for single-line comments

Use one space after the opening and one space before the closing of the
comment.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: 8253.h: reformat other block comments
Ian Abbott [Mon, 26 Jan 2015 12:06:06 +0000 (12:06 +0000)]
staging: comedi: 8253.h: reformat other block comments

Use the usual block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: 8253.h: reformat copyright comment
Ian Abbott [Mon, 26 Jan 2015 12:06:05 +0000 (12:06 +0000)]
staging: comedi: 8253.h: reformat copyright comment

Use the usual block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das16: introduce das16_ai_set_mux_range()
H Hartley Sweeten [Mon, 26 Jan 2015 23:17:21 +0000 (16:17 -0700)]
staging: comedi: das16: introduce das16_ai_set_mux_range()

Introduce a helper function to program the mux and gain for analog input
single channel (*insn_read) and multi-channel (*do_cmd) operations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das16: fix DMA size for short transfers
H Hartley Sweeten [Mon, 26 Jan 2015 23:17:20 +0000 (16:17 -0700)]
staging: comedi: das16: fix DMA size for short transfers

Currently this driver alwasy programs the DMA transfer to be the allocated
size of the DMA buffer. When the async command 'stop_src' is TRIG_COUNT its
possible (likely) for the last transfer to be less than the buffer size.

Introduce a helper function, das16_ai_setup_dma(), to calculate the actual
size of the DMA transfer based on the number of samples remaining and the
number of unread samples.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das16: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Mon, 26 Jan 2015 23:17:19 +0000 (16:17 -0700)]
staging: comedi: das16: use comedi_async 'scans_done' to detect EOA

Refactor das16_interrupt() to use the comedi_async 'scans_done' member to
detect the End-of-Acquisition for the async command. Use the helper function
comedi_nsamples_left() to determine if DMA needs to be restarted.

This allows the removal of the private data 'adc_byte_count' and fixes a
possible integer overflow issue when that value is calculated.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das16: change type of private data 'timer_running'
H Hartley Sweeten [Mon, 26 Jan 2015 23:17:18 +0000 (16:17 -0700)]
staging: comedi: das16: change type of private data 'timer_running'

This member of the private data is a true/false flag. For aesthetics,
change the type to an unsigned int bit-field to save a bit of space.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das16: introduce das16_ao_range()
H Hartley Sweeten [Mon, 26 Jan 2015 23:17:17 +0000 (16:17 -0700)]
staging: comedi: das16: introduce das16_ao_range()

Clarify the (*attach) a bit by introducing a helper function to handle the
setup of the analog output 'range_table'.

Some of the boards supported by this driver do not have programmable ranges.
The analog output subdevice can use optional range information provided by
the user during the attach of the driver. Currently this range data is
allocated and stored in the private data.

Use the subdevice private data member instead and allocate the memory with
comedi_alloc_spriv(). The comedi core will automatically free this memory
when the driver is detached. If the allocation fails set the 'range_table'
to 'range_unknown' instead of failing the driver attach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das16: introduce das16_ai_range()
H Hartley Sweeten [Mon, 26 Jan 2015 23:17:16 +0000 (16:17 -0700)]
staging: comedi: das16: introduce das16_ai_range()

Clarify the (*attach) a bit by introducing a helper function to handle the
setup of the analog input 'range_table'.

Some of the boards supported by this driver do not have programmable ranges.
The analog input subdevice can use optional range information provided by
the user during the attach of the driver. Currently this range data is
allocated and stored in the private data.

Use the subdevice private data member instead and allocate the memory with
comedi_alloc_spriv(). The comedi core will automatically free this memory
when the driver is detached. If the allocation fails set the 'range_table'
to 'range_unknown' instead of failing the driver attach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das16: absorb das16_ai_disable()
H Hartley Sweeten [Mon, 26 Jan 2015 23:17:15 +0000 (16:17 -0700)]
staging: comedi: das16: absorb das16_ai_disable()

This function is only called by das16_cancel(). Absorb it to clarify code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das16: remove unnecessary das16_ai_disable()
H Hartley Sweeten [Mon, 26 Jan 2015 23:17:14 +0000 (16:17 -0700)]
staging: comedi: das16: remove unnecessary das16_ai_disable()

The das16_ai_disable() function disables interrupts and the pacer clock. This
function is called by the subdevice (*cancel) operation.

The comedi core will not call a subdevice (*insn_read) operation while an
async command is running due to the s->busy check in parse_insn(). Since all
async commands are terminated by a (*cancel), the das16_ai_disable() is not
necessary in das16_ai_insn_read(). Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das16: absorb das16_ai_enable()
H Hartley Sweeten [Mon, 26 Jan 2015 23:17:13 +0000 (16:17 -0700)]
staging: comedi: das16: absorb das16_ai_enable()

This function is only called by das16_cmd_exec(). Absorb it to clarify code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Use put_unaligned_le16 in rtl819x_BAProc.c
Vaishali Thakkar [Tue, 27 Jan 2015 18:11:13 +0000 (23:41 +0530)]
Staging: rtl8192u: Use put_unaligned_le16 in rtl819x_BAProc.c

This patch introduces the use of function put_unaligned_le16.

This is done using Coccinelle and semantic patch used is as follows:

@a@
typedef u16, __le16, uint16_t;
{u16,__le16,uint16_t} e16;
identifier tmp;
expression ptr;
expression y,e;
type T;
type T;
@@

- tmp = cpu_to_le16(y);

<+... when != tmp
(
- memcpy(ptr, (T)&tmp, \(2\|sizeof(u16)\|sizeof(__le16)\|sizeof(uint16_t)\|sizeof(e16)\));
+ put_unaligned_le16(y,ptr);
|
- memcpy(ptr, (T)&tmp, ...);
+ put_unaligned_le16(y,ptr);
)
...+>
? tmp = e

@@ type T; identifier a.tmp; @@

- T tmp;
...when != tmp

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: Refactor heavy nesting
Lorenzo Stoakes [Sat, 24 Jan 2015 15:45:24 +0000 (15:45 +0000)]
staging: rtl8192u: Refactor heavy nesting

This patch fixes warnings raised by checkpatch.pl relating to heavily indented
lines in r8192U_dm.c by refactoring code to achieve the same outcome indented by
one less tab.

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: remove redundant code
Lorenzo Stoakes [Sat, 24 Jan 2015 15:45:23 +0000 (15:45 +0000)]
staging: rtl8192u: remove redundant code

This patch fixes warnings/errors raised by checkpatch.pl relating to redundant
code in r8192U_dm.c.

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: fix whitespace and alignment
Lorenzo Stoakes [Sat, 24 Jan 2015 15:45:22 +0000 (15:45 +0000)]
staging: rtl8192u: fix whitespace and alignment

This patch fixes warnings/errors raised by checkpatch.pl relating to whitespace
in r8192U_dm.c, removes inconsistent whitespace, and additionally fixes some
vertical alignment issues.

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: fix comments
Lorenzo Stoakes [Sat, 24 Jan 2015 15:45:21 +0000 (15:45 +0000)]
staging: rtl8192u: fix comments

This patch fixes errors raised by checkpatch.pl relating to use of C99 comments
in r8192U_dm.c, and cleans up existing ANSI C comments.

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: core: rtw_wlan_util.c: Fix for NULL dereference
Kumar Amit Mehta [Mon, 26 Jan 2015 15:39:14 +0000 (16:39 +0100)]
staging: rtl8188eu: core: rtw_wlan_util.c: Fix for NULL dereference

In rtw_check_bcn_info(), check the return value of kzalloc() before
dereferencing it, to avoid NULL pointer dereference.

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: remove useless printing line
Heba Aamer [Wed, 28 Jan 2015 10:00:22 +0000 (12:00 +0200)]
staging: rtl8712: remove useless printing line

This patch removes an unneeded call to printk.

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: rework signal remove/insert to avoid sparse lock warnings
Zachary Warren [Sat, 17 Jan 2015 11:39:53 +0000 (22:39 +1100)]
staging: unisys: rework signal remove/insert to avoid sparse lock warnings

Avoids the following warnings from sparse:
visorchannel_funcs.c:457:9: warning:
 context imbalance in 'visorchannel_signalremove' - different lock contexts for basic block
visorchannel_funcs.c:512:9: warning:
 context imbalance in 'visorchannel_signalinsert' - different lock contexts for basic

These warnings are false positives. Sparse can't track conditional contexts. The change
puts the lock/unlock into the same context by splitting the insert/remove functions each
into a wrapper function that does locking if necessary and an inner function that does the
insert/remove operation.

Signed-off-by: Zachary Warren <conflatulence@gmail.com>
Acked-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lustre: mdc: lproc_mdc.c: Fix for potential NULL pointer dereference
Kumar Amit Mehta [Mon, 26 Jan 2015 15:44:53 +0000 (16:44 +0100)]
staging: lustre: lustre: mdc: lproc_mdc.c: Fix for potential NULL pointer dereference

In mdc_kuc_write(), OBD_ALLOC(lh, len) may leave 'lh' to NULL as kmalloc
may fail to allocate memory. This fix adds a check to avoid, dereferencing
a NULL pointer.

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lustre: obdclass: obd_mount.c: Fix NULL dereference
Kumar Amit Mehta [Mon, 26 Jan 2015 16:52:22 +0000 (17:52 +0100)]
staging: lustre: lustre: obdclass: obd_mount.c: Fix NULL dereference

OBD_ALLOC_PTR(uuid) invokes kmalloc, which may return NULL. This fix
adds a check before dereferencing such pointer.

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: libcfs: nidstrings: Change type in printf format string
Rickard Strandqvist [Tue, 27 Jan 2015 21:29:59 +0000 (22:29 +0100)]
staging: lustre: libcfs: nidstrings: Change type in printf format string

Wrong type in printf format string, requires 'unsigned int'
but the argument type is 'int'

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm7xxfb: fix alignment
Sudip Mukherjee [Mon, 19 Jan 2015 08:11:06 +0000 (13:41 +0530)]
staging: sm7xxfb: fix alignment

checkpatch cleanup: alignment should match open parenthesis

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm7xxfb: remove unnecessary blank lines
Sudip Mukherjee [Mon, 19 Jan 2015 08:11:05 +0000 (13:41 +0530)]
staging: sm7xxfb: remove unnecessary blank lines

checkpatch cleanup: blank lines are not necessary before closing brace
and after opening brace.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm7xxfb: no space is necessary after a cast
Sudip Mukherjee [Mon, 19 Jan 2015 08:11:04 +0000 (13:41 +0530)]
staging: sm7xxfb: no space is necessary after a cast

checkpatch cleanup: space is not necessary after cast

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm7xxfb: add missing blank line
Sudip Mukherjee [Mon, 19 Jan 2015 08:11:03 +0000 (13:41 +0530)]
staging: sm7xxfb: add missing blank line

checkpatch cleanup to add missing blank line after declaration

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMAINTAINERS: update for SM7XX driver
Sudip Mukherjee [Mon, 19 Jan 2015 08:11:02 +0000 (13:41 +0530)]
MAINTAINERS: update for SM7XX driver

add myself and Teddy Wang as the Maintainer of the
SM7XX FRAME BUFFER DRIVER.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm7xxfb: update TODO file
Sudip Mukherjee [Mon, 19 Jan 2015 08:11:01 +0000 (13:41 +0530)]
staging: sm7xxfb: update TODO file

update the email addresses in the TODO file, also update the final
destination of this driver.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoRevert "staging: sm7xxfb: remove driver"
Sudip Mukherjee [Mon, 19 Jan 2015 08:11:00 +0000 (13:41 +0530)]
Revert "staging: sm7xxfb: remove driver"

This reverts commit "dc93c85235efa5201e9a3c116bc3fbd1afc1a182"

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: Remove the Android alarm-dev driver
John Stultz [Tue, 20 Jan 2015 21:42:34 +0000 (13:42 -0800)]
staging: Remove the Android alarm-dev driver

The functionality provided by the Android alarm-dev driver
should now be present in the timerfd interface (thanks to
Greg Hackmann and Todd Poynor).

As of Lollipop, AOSP can make use of the timerfd if
alarm-dev is not present (though a fixup for setting the
rtc time if rtc0 isn't the backing for _ALARM clockids has
been applied post-Lollipop).

Thus, we should be able to remove alarm-dev from staging.

Cc: Greg Hackmann <ghackmann@google.com>
Cc: Elliott Hughes <enh@google.com>
Cc: Todd Poynor <toddpoynor@google.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: fix "if" statement that always evaluates to true
Daeseok Youn [Fri, 23 Jan 2015 11:44:28 +0000 (20:44 +0900)]
staging: dgap: fix "if" statement that always evaluates to true

cppcheck warning:
(warnning) Logical disjunction always evaluates to true

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fbtft-core mark functions static
Krzysztof Adamski [Thu, 22 Jan 2015 18:08:58 +0000 (19:08 +0100)]
staging: fbtft: fbtft-core mark functions static

This fixes sparse warnings like:
     warning: symbol XXX was not declared. Should it be static?

by declaring all local functions static.

Signed-off-by: Krzysztof Adamski <k@japko.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: dgnc: fixed some coding style errors
Andrew Milkovich [Sun, 18 Jan 2015 18:41:30 +0000 (10:41 -0800)]
Staging: dgnc: fixed some coding style errors

This patch fixes the following checkpatch.pl error:
ERROR: Macros with complex values should be enclosed in parentheses
Outer parentheses were added to macro definitions.

Signed-off-by: Andrew Milkovich <amilkovich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: fix long lines in PCI device table
Krzysztof Adamski [Thu, 22 Jan 2015 19:19:26 +0000 (20:19 +0100)]
staging: dgnc: fix long lines in PCI device table

This patch fixes coding style of PCI device table declaration.

Signed-off-by: Krzysztof Adamski <k@japko.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rts5208: use msecs_to_jiffies for timeouts
Nicholas Mc Guire [Fri, 23 Jan 2015 07:15:53 +0000 (08:15 +0100)]
staging: rts5208: use msecs_to_jiffies for timeouts

This is only an API consolidation and should make things more readable

Converting milliseconds to jiffies by val * HZ / 1000 is technically
not wrong but msecs_to_jiffies(val) is the cleaner solution and handles
corner cases correctly.

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wlan-ng: hfa384x_usb: fix sparse endianness warnings
Asaf Vertz [Sun, 18 Jan 2015 07:11:39 +0000 (09:11 +0200)]
staging: wlan-ng: hfa384x_usb: fix sparse endianness warnings

Fixed the following warnings (reported by sparse):
drivers/staging/wlan-ng/hfa384x_usb.c:3828:36: warning: cast to restricted __le16
drivers/staging/wlan-ng/hfa384x_usb.c:3229:16: warning: cast to restricted __le16
drivers/staging/wlan-ng/hfa384x_usb.c:3430:18: warning: cast to restricted __le16
drivers/staging/wlan-ng/hfa384x_usb.c:3349:51: warning: restricted __le16 degrades to integer
drivers/staging/wlan-ng/hfa384x_usb.c:3357:37: warning: cast to restricted __le16
drivers/staging/wlan-ng/hfa384x_usb.c:3358:37: warning: cast to restricted __le16
drivers/staging/wlan-ng/hfa384x_usb.c:3393:36: warning: cast to restricted __le16
drivers/staging/wlan-ng/hfa384x_usb.c:3102:28: warning: cast to restricted __le16
drivers/staging/wlan-ng/hfa384x_usb.c:3004:28: warning: cast to restricted __le16
drivers/staging/wlan-ng/hfa384x_usb.c:1308:37: warning: cast to restricted __le16
drivers/staging/wlan-ng/hfa384x_usb.c:2713:25: warning: incorrect type in assignment (different base types)
drivers/staging/wlan-ng/hfa384x_usb.c:2713:25:    expected unsigned short [unsigned] [usertype] type
drivers/staging/wlan-ng/hfa384x_usb.c:2713:25:    got restricted __le16 [usertype] <noident>

Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: remove unused function
Sudip Mukherjee [Thu, 22 Jan 2015 06:39:16 +0000 (12:09 +0530)]
staging: rtl8712: remove unused function

mp_query_drv_var() was only being used by
oid_rt_pro_query_dr_variable_hdl() but after commit
<f4f5a59ff2e746885be3c1c06c1d0e8861a10ce8> mp_query_drv_var() became
unused. so it is safe to remove it.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: fix space coding style issue in os_intfs.c
Peter Poklop [Mon, 19 Jan 2015 17:26:53 +0000 (18:26 +0100)]
Staging: rtl8723au: fix space coding style issue in os_intfs.c

This patch fixes the checkpatch.pl warning:

WARNING: space prohibited before semicolon

Signed-off-by: Peter Poklop <peter.poklop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: recv_linux: Remove unused function
Rickard Strandqvist [Sun, 18 Jan 2015 01:07:23 +0000 (02:07 +0100)]
staging: rtl8712: recv_linux: Remove unused function

Remove the function r8712_os_read_port() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: core: rtw_cmd: Remove unused functions
Rickard Strandqvist [Sun, 18 Jan 2015 00:59:09 +0000 (01:59 +0100)]
staging: rtl8723au: core: rtw_cmd: Remove unused functions

Removes some functions that are not used anywhere:
rtw_set_ch_cmd23a() rtw_cmd_clr_isr23a()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: os_dep: usb_intf: Remove unused functions
Rickard Strandqvist [Sun, 18 Jan 2015 00:41:23 +0000 (01:41 +0100)]
staging: rtl8723au: os_dep: usb_intf: Remove unused functions

Removes some functions that are not used anywhere:
rtw_hw_resume23a() rtw_hw_suspend23a()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix CamelCase in enable_ints_write()
Benjamin Romer [Tue, 20 Jan 2015 15:01:21 +0000 (10:01 -0500)]
staging: unisys: fix CamelCase in enable_ints_write()

Fix CamelCase variable name:

Features_addr => features_addr

Update references to use the new name.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix CamelCase name in virthba_probe()
Benjamin Romer [Tue, 20 Jan 2015 15:01:20 +0000 (10:01 -0500)]
staging: unisys: fix CamelCase name in virthba_probe()

Fix CamelCase local variable name:

pChannelHeader => channel_header

Update references to use the new name.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: refactor virthba_ISR()
Benjamin Romer [Tue, 20 Jan 2015 15:01:19 +0000 (10:01 -0500)]
staging: unisys: refactor virthba_ISR()

Fix CamelCase names:

virthba_ISR => virthba_isr
pChannelHeader => channel_header

Update all references to the modified names.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Fix CamelCase for function names in virthba.c
Ken Depro [Tue, 20 Jan 2015 15:01:18 +0000 (10:01 -0500)]
staging: unisys: Fix CamelCase for function names in virthba.c

This patch fixes CamelCase function names in virthba.c, reported by the
checkpatch script:
  doDiskAddRemove --> do_disk_add_remove
  SendDiskAddRemove --> send_disk_add_remove

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Fix remaining CamelCase global variables in virthba.c
Ken Depro [Tue, 20 Jan 2015 15:01:17 +0000 (10:01 -0500)]
staging: unisys: Fix remaining CamelCase global variables in virthba.c

This patch fixes the remaining CamelCase global variables in virthba.c reported
by the checkpatch script:
  MaxBuffLen --> max_buff_len
  VirtHbasOpen --> virthbas_open

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Fix CamelCase for Disk Add/Remove global variables in virthba.c
Ken Depro [Tue, 20 Jan 2015 15:01:16 +0000 (10:01 -0500)]
staging: unisys: Fix CamelCase for Disk Add/Remove global variables in virthba.c

This patch fixes the Disk Add/Remove (DAR) related CamelCase global
variables in virthba.c, reported by the checkpatch script:
  DARWorkQ --> dar_work_queue
  DARWorkQHead --> dar_work_queue_head
  DARWorkQLock --> dar_work_queue_lock
  DARWorkQSched --> dar_work_queue_sched

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Fix open parenthesis alignment issues in virthba.c
Ken Depro [Tue, 20 Jan 2015 15:01:15 +0000 (10:01 -0500)]
staging: unisys: Fix open parenthesis alignment issues in virthba.c

This patch fixes a couple checkpatch checks where alignment of the parameters
did not match the open parenthesis of the function.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Fix warnings regarding lines over 80 characters in virthba.c
Ken Depro [Tue, 20 Jan 2015 15:01:14 +0000 (10:01 -0500)]
staging: unisys: Fix warnings regarding lines over 80 characters in virthba.c

This patch fixes warnings generated by checkpatch script regarding lines
over 80 characters long.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Fix "else not useful after return" warning in virthba.c
Ken Depro [Tue, 20 Jan 2015 15:01:13 +0000 (10:01 -0500)]
staging: unisys: Fix "else not useful after return" warning in virthba.c

This patch fixes a warning generated during the checkpatch script that stated
"else not useful after return".  I modified the code to return a designated
status at the end of the function, and replaced the return statement in the
"else if" to set the status accordingly.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix checkpatch checks for structs in virthba.c
Ken Depro [Tue, 20 Jan 2015 15:01:12 +0000 (10:01 -0500)]
staging: unisys: fix checkpatch checks for structs in virthba.c

This patch fixes a couple small issues reported by the checkpatch script:
  Adds a blank line after a struct definition.
  Removes unnecessary parentheses surrounding a dereference of a struct member.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Change alloc calls to use var name instead of type in virthba.c
Ken Depro [Tue, 20 Jan 2015 15:01:11 +0000 (10:01 -0500)]
staging: unisys: Change alloc calls to use var name instead of type in virthba.c

This patch changes a couple of kzalloc calls to pass the variable name to the
call, rather than the variable struct type.  This is a result of checks
generated during the checkpatch script.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove blank lines before/after braces in virthba.c
Ken Depro [Tue, 20 Jan 2015 15:01:10 +0000 (10:01 -0500)]
staging: unisys: Remove blank lines before/after braces in virthba.c

This patch removes unnecessary blank lines either before opening braces or
after closing braces, as reported by the checkpatch script.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Fix logical continuation checks in virthba.c
Ken Depro [Tue, 20 Jan 2015 15:01:09 +0000 (10:01 -0500)]
staging: unisys: Fix logical continuation checks in virthba.c

This patch fixes checkpatch checks where the logical operator should be at the
end of the line above, not beginning the next line.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Fix open parenthesis alignment checks in virthba.c
Ken Depro [Tue, 20 Jan 2015 15:01:08 +0000 (10:01 -0500)]
staging: unisys: Fix open parenthesis alignment checks in virthba.c

This patch fixes the "alignment should match open parenthesis" checks from the
checkpatch script.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove unneeded spaces after casts in virthba.c
Ken Depro [Tue, 20 Jan 2015 15:01:07 +0000 (10:01 -0500)]
staging: unisys: Remove unneeded spaces after casts in virthba.c

This patch removes all unnecessary spaces after casts, as reported by the
checkpatch script.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: fix Prefer ether_addr_copy() over memcpy() if the Ethernet addresses...
Heba Aamer [Wed, 21 Jan 2015 11:08:48 +0000 (13:08 +0200)]
staging: vt6656: fix Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)

This patch fixes the following checkpatch.pl warning:
fix Prefer ether_addr_copy() over memcpy()
if the Ethernet addresses are __aligned(2)

Pahole showed that the 2 structs are aligned to u16

struct vnt_mic_hdr {
        u8                         id;                   /*     0     1 */
        u8                         tx_priority;          /*     1     1 */
        u8                         mic_addr2[6];         /*     2     6 */
        u8                         ccmp_pn[6];           /*     8     6 */
        __be16                     payload_len;          /*    14     2 */
        __be16                     hlen;                 /*    16     2 */
        __le16                     frame_control;        /*    18     2 */
        u8                         addr1[6];             /*    20     6 */
        u8                         addr2[6];             /*    26     6 */
        u8                         addr3[6];             /*    32     6 */
        __le16                     seq_ctrl;             /*    38     2 */
        u8                         addr4[6];             /*    40     6 */
        u16                        packing;              /*    46     2 */

        /* size: 48, cachelines: 1, members: 13 */
        /* last cacheline: 48 bytes */
};

struct ieee80211_hdr {
        __le16                     frame_control;        /*     0     2 */
        __le16                     duration_id;          /*     2     2 */
        u8                         addr1[6];             /*     4     6 */
        u8                         addr2[6];             /*    10     6 */
        u8                         addr3[6];             /*    16     6 */
        __le16                     seq_ctrl;             /*    22     2 */
        u8                         addr4[6];             /*    24     6 */

        /* size: 30, cachelines: 1, members: 7 */
        /* last cacheline: 30 bytes */
};

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
Reviewed-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: RFbSetPower remove unused variable byPwrdBm
Malcolm Priestley [Mon, 19 Jan 2015 18:24:15 +0000 (18:24 +0000)]
staging: vt6655: RFbSetPower remove unused variable byPwrdBm

byPwrdBm is set but never used.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Fix RFbSetPower() error: buffer overflow 'priv->abyCCKPwrTbl' 15...
Malcolm Priestley [Mon, 19 Jan 2015 18:24:14 +0000 (18:24 +0000)]
staging: vt6655: Fix RFbSetPower() error: buffer overflow 'priv->abyCCKPwrTbl' 15 <= 56

Check uCH is not more than CB_MAX_CHANNEL_24G(14) on rates RATE_1M to RATE_11M

Return false as the call is invalid as these rates do not exist
above channel 14.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: device_init_registers alway set initial antenna mode
Malcolm Priestley [Mon, 19 Jan 2015 18:24:13 +0000 (18:24 +0000)]
staging: vt6655: device_init_registers alway set initial antenna mode

BBvSetTxAntennaMode and BBvSetRxAntennaMode need to be set correcty
on start up

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: remove antenna diversity functions
Malcolm Priestley [Mon, 19 Jan 2015 18:24:12 +0000 (18:24 +0000)]
staging: vt6655: remove antenna diversity functions

The vendor had disabled these functions in their last version.

On test this can be troublesome, so remove this from the driver along
with its macros and timers.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: common variable size channel numbers to ieee80211_channel->hw_value
Malcolm Priestley [Mon, 19 Jan 2015 18:24:11 +0000 (18:24 +0000)]
staging: vt6655: common variable size channel numbers to ieee80211_channel->hw_value

hw_value is u16 so fix all to the same size.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: set_channel replace parameter with ieee80211_channel
Malcolm Priestley [Mon, 19 Jan 2015 18:24:10 +0000 (18:24 +0000)]
staging: vt6655: set_channel replace parameter with ieee80211_channel

replacing uConnectionChannel for hw_value as set in vnt_init_bands.

This allows other signaling of ieee80211_channel to move deeper into
driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: fix space prohibted before that ','
Ahmad Hassan [Mon, 19 Jan 2015 22:13:58 +0000 (13:13 -0900)]
staging: vt6655: fix space prohibted before that ','

This patch fixes the following checkpatch.pl error:
fix space prohibited before that ','

Signed-off-by: Ahmad Hassan <ahmad.hassan612@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: fix space prohibited before that ','
Heba Aamer [Mon, 19 Jan 2015 10:16:30 +0000 (12:16 +0200)]
staging: vt6655: fix space prohibited before that ','

This patch fixes the following checkpatch.pl error:
fix space prohibited before that ','

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
Reviewed-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>