]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
9 years agostaging: wilc1000: use memcmp instead of WILC_memcmp
Chaehyun Lim [Fri, 7 Aug 2015 00:02:03 +0000 (09:02 +0900)]
staging: wilc1000: use memcmp instead of WILC_memcmp

Use memcmp instead of WILC_memcmp.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove WILC_memset function
Chaehyun Lim [Fri, 7 Aug 2015 00:02:02 +0000 (09:02 +0900)]
staging: wilc1000: remove WILC_memset function

Remove WILC_memset function because it is changed to memset.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: use memset instead of WILC_memset
Chaehyun Lim [Fri, 7 Aug 2015 00:02:01 +0000 (09:02 +0900)]
staging: wilc1000: use memset instead of WILC_memset

Use memset instead of WILC_memset.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: use kmemdup rather than duplicating its implementation
Andrzej Hajda [Fri, 7 Aug 2015 07:59:25 +0000 (09:59 +0200)]
staging/lustre: use kmemdup rather than duplicating its implementation

The patch was generated using fixed coccinelle semantic patch
scripts/coccinelle/api/memdup.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2014320

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: change SupportedRates to rates
Joshua Clayton [Thu, 6 Aug 2015 00:17:21 +0000 (17:17 -0700)]
staging: rtl8712: change SupportedRates to rates

Change the value to a name that conforms to Linux coding style.

"rates" is equally expressive in this context, and I have left alone
a comment and function name that describe the rates as supported rates.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: remove typedefs
Joshua Clayton [Thu, 6 Aug 2015 00:17:20 +0000 (17:17 -0700)]
staging: rtl8712: remove typedefs

Coding style fix.
Get rid of typedefs NDIS_802_11_RATES and NDIS_802_11_RATES_EX
Undo any casting that was done as a result of the typedef.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: rename function
Joshua Clayton [Thu, 6 Aug 2015 00:17:19 +0000 (17:17 -0700)]
staging: rtl8712: rename function

Rename r8712_get_ndis_wlan_bssid_ex_sz() to r8712_get_wlan_bssid_ex_sz(),
which corresponds to the struct whose size it measures.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: remove duplicate struct
Joshua Clayton [Thu, 6 Aug 2015 00:17:18 +0000 (17:17 -0700)]
staging: rtl8712: remove duplicate struct

struct ndis_wlan_bssid_ex is a doppelganger of struct wlan_bssid_ex,
and is used about a third as often.

Switch all instances to wlan_bssid_ex, and remove ndis_wlan_bssid_ex

This also gets rid of a use of typedef NDIS_802_11_RATES_EX

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: removed unused wrapper structs
Joshua Clayton [Thu, 6 Aug 2015 00:17:17 +0000 (17:17 -0700)]
staging: rtl8712: removed unused wrapper structs

Remove wrapper structs that just wrap struct ndis_wlan_bssid_ex,
and are unused.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: fix comment
Joshua Clayton [Thu, 6 Aug 2015 00:17:16 +0000 (17:17 -0700)]
staging: rtl8712: fix comment

The old comment refers to a typedef name which is being removed,
and to a style of calculation which is no longer being used.
It falsely states that IELength is variable length, instead of IEs.

Change comment to simply state that the IEs field is a buffer of
variable size and that IELength refers to the current size.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: simplify size calculation
Joshua Clayton [Thu, 6 Aug 2015 00:17:15 +0000 (17:17 -0700)]
staging: rtl8712: simplify size calculation

replace item-by-item  size calculation of a struct
with the size of the struct.

This gets rid of a use of typedef NDIS_802_11_RATES_EX

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: simplify return
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:06 +0000 (17:34 +0530)]
staging: sm750fb: simplify return

Lets return the return value directly instead of using a variable to
store the result.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: rearrange code
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:05 +0000 (17:34 +0530)]
staging: sm750fb: rearrange code

Rearrange the code to remove one exit label which also makes the code
less indented and more readable.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: fix multiline comment
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:04 +0000 (17:34 +0530)]
staging: sm750fb: fix multiline comment

Multiline comments are edited to be in the kernel coding style.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: space around operator
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:03 +0000 (17:34 +0530)]
staging: sm750fb: space around operator

Kernel coding style says to have a space around the operators.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove multiple blank line
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:02 +0000 (17:34 +0530)]
staging: sm750fb: remove multiple blank line

Multiple blank lines are not kernel coding style and so checkpatch
complains. Remove them.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: fix buggy size calculation
Joshua Clayton [Thu, 6 Aug 2015 00:17:14 +0000 (17:17 -0700)]
staging: rtl8712: fix buggy size calculation

r8712_get_ndis_wlan_bssid_ex_sz has a "6 * sizeof(unsigned long)"
where the underlying struct has a 6 * unsigned char.
Simplify the calculation by just subtracting the variable part from
the size of the struct.

This also gets rid of a use of typedef NDIS_802_11_RATES_EX

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: lnet: Remove unnecessary parentheses on return
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:49:57 +0000 (23:49 +0200)]
Staging: lustre: lnet: Remove unnecessary parentheses on return

Removed three instances of parentheses in return calls that are
unnecessary and do not contribute to readability.

Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Fix space before '[' error
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:48:48 +0000 (23:48 +0200)]
staging: lustre: Fix space before '[' error

Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['

Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Fix space before '(' warnings
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:47:41 +0000 (23:47 +0200)]
staging: lustre: Fix space before '(' warnings

Fix several instances of checkpatch.pl warning:
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Fix space before '++' error
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:45:50 +0000 (23:45 +0200)]
staging: lustre: Fix space before '++' error

Fix checkpatch.pl error:
ERROR: space prohibited before that '++' (ctx:WxO)

Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Fix code indent error
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:44:36 +0000 (23:44 +0200)]
staging: lustre: Fix code indent error

Fix checkpatch.pl error:
ERROR: code indent should use tabs where possible

Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Unnecessary line continuation
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:43:08 +0000 (23:43 +0200)]
staging: lustre: Unnecessary line continuation

Fix checkpatch.pl warning:
WARNING: Avoid unnecessary line continuations

Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fsl-mc: add DPAA2 overview readme
Stuart Yoder [Fri, 7 Aug 2015 01:09:24 +0000 (20:09 -0500)]
staging: fsl-mc: add DPAA2 overview readme

add README file providing an overview of the DPAA2 architecture
and how it is integrated in Linux

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: vme: remove an unnecessary and wrong warning message
Navy Cheng [Thu, 6 Aug 2015 01:47:57 +0000 (09:47 +0800)]
Staging: vme: remove an unnecessary and wrong warning message

The wrong warning message in vme_user_probe() will mislead developers and
users. As the error message which prompt cdev_add() error already exists,
just remove the unnecessary and wrong message.

Signed-off-by: Navy Cheng <navych@126.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon: fix coding style warnings for block comments
Okash Khawaja [Wed, 5 Aug 2015 20:13:52 +0000 (21:13 +0100)]
staging: octeon: fix coding style warnings for block comments

The Linux kernel coding style suggests starting every line in a block
comment with an asterisk and finishing the block comment with */ on a
separate line. This patch fixes those warnings, clearing all warnings
and errors in this file, as reported by the checkpatch script.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: fbtft: Use a struct to describe each LCD controller
Fabio Falzoi [Sun, 2 Aug 2015 20:30:14 +0000 (22:30 +0200)]
Staging: fbtft: Use a struct to describe each LCD controller

Use a struct flexfb_lcd_controller to holds chip properties, instead of
relying on a long 'if - else if' chain.
This allows to:
- use a simple linear search to verify if a certain LCD controller
model is supported or not.
- add support for a new LCD chip controller simply defining a new
flexfb_lcd_controller struct.

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: rtl8723a_hal_init: Improve code readability
Johannes Postma [Fri, 7 Aug 2015 13:04:34 +0000 (14:04 +0100)]
staging: rtl8723au: rtl8723a_hal_init: Improve code readability

This patch improves code readability in the function
rtl8723a_cal_txdesc_chksum.  It improves the readability of the argument
of the function le16_to_cpu.

Signed-off-by: Johannes Postma <jgmpostma@gmail.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Fix sparse warning: cast to restricted __le16
Johannes Postma [Thu, 6 Aug 2015 11:21:52 +0000 (12:21 +0100)]
staging: rtl8723au: Fix sparse warning: cast to restricted __le16

usPtr is used as __le16 *, but was defined as u16 *.
This was reported by sparse as:
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1850:29: warning: cast to
restricted __le16

This patch fixes the type of usPtr.

Signed-off-by: Johannes Postma <jgmpostma@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMAINTAINERS: update maintainers list
Sudip Mukherjee [Fri, 7 Aug 2015 13:01:15 +0000 (18:31 +0530)]
MAINTAINERS: update maintainers list

Now since sm712fb has moved out of staging update the maintainers list
accordingly.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDocumentation/fb: add documentation for sm712fb
Sudip Mukherjee [Fri, 7 Aug 2015 13:01:14 +0000 (18:31 +0530)]
Documentation/fb: add documentation for sm712fb

Create the documentation for SM712. Mention all the supported modes and
how to use.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm7xxfb: merge sm712fb with fbdev
Sudip Mukherjee [Fri, 7 Aug 2015 13:01:13 +0000 (18:31 +0530)]
staging: sm7xxfb: merge sm712fb with fbdev

Now since all cleanups are done and the code is ready to be merged lets
move it out of staging into fbdev location.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: me4000: update MODULE_DESCRIPTION
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:23 +0000 (10:45 -0700)]
staging: comedi: me4000: update MODULE_DESCRIPTION

Change the MODULE_DESCRIPTION to something more useful than "Comedi low-
level driver"

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: me4000: updata driver status in comedi comment
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:22 +0000 (10:45 -0700)]
staging: comedi: me4000: updata driver status in comedi comment

Firmware loading was fixed by:

Commit: ac584af5
"staging: comedi: me4000: fix firmware downloading"

Change the driver status to "untested" and remove the comments about
the driver being broken,

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: me4000: cleanup multi-line comments
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:21 +0000 (10:45 -0700)]
staging: comedi: me4000: cleanup multi-line comments

Format the multi-line comments in the kernel CodingStyle.

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: me4000: usleep_range is preferred over udelay
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:20 +0000 (10:45 -0700)]
staging: comedi: me4000: usleep_range is preferred over udelay

Fix checkpatch issue: "CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt".  `udelay()` is only used in the
firmware upload process.  Replace them with `usleep_range()` with a
reasonable upper limit.

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: me4000: introduce me4000_ai_get_sample()
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:19 +0000 (10:45 -0700)]
staging: comedi: me4000: introduce me4000_ai_get_sample()

The hardware returns two's complement values for the analog input
samples. These need to be converted to the unsigned binary format
that the comedi core expects. Introduce a helper function to handle
this.

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: me4000: comedi_handle_events() will stop conversions
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:18 +0000 (10:45 -0700)]
staging: comedi: me4000: comedi_handle_events() will stop conversions

The irq handler does not need to manually stop conversions and disable
interrupts when "end-of-acquisition", "error", or "overflow" events are
detected. The comedi_handle_events() will call the subdevice (*cancel)
when these are detected and stop the acquisition.

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: me4000: tidy up analog output subdevice init
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:17 +0000 (10:45 -0700)]
staging: comedi: me4000: tidy up analog output subdevice init

For aesthetics, add some white space to the analog output subdevice
initialization.

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: me4000: fix me4000_detach()
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:16 +0000 (10:45 -0700)]
staging: comedi: me4000: fix me4000_detach()

There is no real reason to reset the board when detaching. The comedi core
will ensure that any commands are canceled before the detach.

But the PLX interrupts should be disabled.

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: me4000: only enable PLX interrupt if we have and irq
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:15 +0000 (10:45 -0700)]
staging: comedi: me4000: only enable PLX interrupt if we have and irq

Currently me4000_reset() always enables the PLX interrupt. Move the
enable of the interrupt into me4000_auto_attach() and only do the
enable if we actually have and irq.

Make sure the PLX interrupt is disabled in me4000_reset() before we
try to request the irq.

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: me4000: introduce me4000_ai_reset()
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:14 +0000 (10:45 -0700)]
staging: comedi: me4000: introduce me4000_ai_reset()

Introduce a helper function to stop any ai conversions and reset the
ai control register. This consolidates the common code in me4000_reset()
and me4000_ai_cancel().

Use the new helper in the ai (*insn_read) to ensure that the ai control
register is set to a known state after reading the samples.

The ai control register will now always be '0' after the (*cancel) of
a command or doing an (*insn_read). Knowing this the programming of
the register for single acquisition mode in the (*insn_read) can be
simplified.

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: me4000: clear the ME4000_AI_CTRL_REG in me4000_reset()
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:13 +0000 (10:45 -0700)]
staging: comedi: me4000: clear the ME4000_AI_CTRL_REG in me4000_reset()

Reset the analog input control register after ensuring that any active
conversions have been stopped. This mimics what the ai subdevice (*cancel)
does.

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: me4000: remove unnecessary me4000_ai_cancel()
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:12 +0000 (10:45 -0700)]
staging: comedi: me4000: remove unnecessary me4000_ai_cancel()

The comedi core ensures that the subdevice is not busy before it allows
starting a new command. The subdevice (*cancel) is called when the
subdevice is set to not busy. In this driver the me4000_ai_cancel()
is the ai (*cancel) so the extra call in the ai (*do_cmd) is not
necessary. 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: me4000: remove unnecessary ai control register reset
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:11 +0000 (10:45 -0700)]
staging: comedi: me4000: remove unnecessary ai control register reset

The me4000_ai_cancel() already reset this register.

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: me4000: fix me4000_ai_cancel()
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:10 +0000 (10:45 -0700)]
staging: comedi: me4000: fix me4000_ai_cancel()

The STOP and IMMEDIATE_STOP bits in the ME4000_AI_CTRL_REG should be set,
not cleared, to stop any running conversions.

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: me4000: return void from me4000_ai_write_chanlist()
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:09 +0000 (10:45 -0700)]
staging: comedi: me4000: return void from me4000_ai_write_chanlist()

This function always returns 0 and the return value is never checked.
Just return void.

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: me4000: absorb ai_write_timer()
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:08 +0000 (10:45 -0700)]
staging: comedi: me4000: absorb ai_write_timer()

This function is only called by me4000_ai_do_cmd(). Absorb 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: me4000: absorb ai_prepare()
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:07 +0000 (10:45 -0700)]
staging: comedi: me4000: absorb ai_prepare()

This function never fails and it's only called by me4000_ai_do_cmd().

Absorb it and remove the unnecessary failure check.

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: me4000: simplify ai_prepare()
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:06 +0000 (10:45 -0700)]
staging: comedi: me4000: simplify ai_prepare()

The ai (*do_cmd_test) validates the trigger sources in Step 2b to ensure
that they are compatible. Save the 'ai_ctrl_mode' that will be used in the
private data so that ai_prepare(), which is called by the ai (*do_cmd),
does not have to recheck the sources in order to figure it out.

Also, tidy up the stop trigger checks so that the ME4000_AI_CTRL_HF_IRQ
bit is set in the common code path.

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: me4000: move ai command timing values into private data
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:05 +0000 (10:45 -0700)]
staging: comedi: me4000: move ai command timing values into private data

The ai (*do_cmd_test) calls me4000_ai_round_cmd_args() to calculate the
timing values needed to the command. The the command test passes, the
core will then call the ai (*do_cmd) which then has to call
me4000_ai_round_cmd_args() again in order to get the same values to
pass to ai_prepare() in order to program the timing.

Add members to the private data to allow the (*do_cmd_test) to calculate
and save to values needed by ai_prepare().

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: me4000: return void from ai_round_cmd_args()
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:04 +0000 (10:45 -0700)]
staging: comedi: me4000: return void from ai_round_cmd_args()

This function always succeeds. Change the return type to void and
remove the unnecessary error check in me4000_ai_do_cmd().

Move the function call in me4000_ai_do_cmd_test() from before Step 1
to Step 3 where the arguments are validated. There is no reason to
get the values if the previous steps fail.

Rename the function so it has namespace associated with the driver.

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: me4000: tidy up ME4000_DIO_CTRL_REG bit defines
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:03 +0000 (10:45 -0700)]
staging: comedi: me4000: tidy up ME4000_DIO_CTRL_REG bit defines

Use the BIT() marco to define the bits of this register.

For aesthetics, rename all the defines to remove the '_BIT' from the
name.

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: me4000: tidy up ME4000_AO_CTRL_REG bit defines
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:02 +0000 (10:45 -0700)]
staging: comedi: me4000: tidy up ME4000_AO_CTRL_REG bit defines

Use the BIT() marco to define the bits of this register.

For aesthetics, rename all the defines to remove the '_BIT' from the
name.

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: me4000: tidy up ME4000_AO_STATUS_REG bit defines
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:01 +0000 (10:45 -0700)]
staging: comedi: me4000: tidy up ME4000_AO_STATUS_REG bit defines

Use the BIT() marco to define the bits of this register.

For aesthetics, rename all the defines to remove the '_BIT' from the
name.

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: me4000: tidy up ME4000_IRQ_STATUS_REG bit defines
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:00 +0000 (10:45 -0700)]
staging: comedi: me4000: tidy up ME4000_IRQ_STATUS_REG bit defines

Use the BIT() marco to define the bits of this register.

For aesthetics, rename all the defines to remove the '_BIT' from the
name.

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: me4000: tidy up ME4000_AI_CTRL_REG bit defines
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:59 +0000 (10:44 -0700)]
staging: comedi: me4000: tidy up ME4000_AI_CTRL_REG bit defines

Use the BIT() marco to define the bits of this register.

For aesthetics, rename all the defines to remove the '_BIT' from the
name.

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: me4000: tidy up ME4000_AI_STATUS_REG bit defines
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:58 +0000 (10:44 -0700)]
staging: comedi: me4000: tidy up ME4000_AI_STATUS_REG bit defines

Use the BIT() marco to define the bits of this register.

For aesthetics, rename all the defines to remove the '_BIT' from the
name. Also, use ME4000_AI_STATUS_REG instead of ME4000_AI_CTRL_REG
when reading the register (they happen to be the same).

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: me4000: use comedi_range_is_bipolar() in ai (*insn_read)
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:57 +0000 (10:44 -0700)]
staging: comedi: me4000: use comedi_range_is_bipolar() in ai (*insn_read)

Use the helper function to check the range type instead of relying on the
value. For aesthetics, rename the local variable used for the range.

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: me4000: use correct types for extracted chanspec values
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:56 +0000 (10:44 -0700)]
staging: comedi: me4000: use correct types for extracted chanspec values

The chanspec channel, range, and aref are unsigned int values. Use the
correct types when extracting them.

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: me4000: fix me4000_ai_insn_read()
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:55 +0000 (10:44 -0700)]
staging: comedi: me4000: fix me4000_ai_insn_read()

The coemdi (*insn_read) functions are supposed to read insn->n values
from the hardware. Make this function work like the core expects.

Use the comedi_offset_munge() helper to munge the two's complement
values to offset binary.

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: me4000: use comedi_timeout() to wait for ai (*insn_read)
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:54 +0000 (10:44 -0700)]
staging: comedi: me4000: use comedi_timeout() to wait for ai (*insn_read)

Use the comedi_timeout() helper to busy-wait for the analog input end-of-
conversion instead of the udelay().

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: me4000: tidy up ME4000_AI_CHANNEL_LIST_REG bit defines
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:53 +0000 (10:44 -0700)]
staging: comedi: me4000: tidy up ME4000_AI_CHANNEL_LIST_REG bit defines

Use the BIT() macro to define the bits of this register.

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: me4000: fix ai_write_chanlist()
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:52 +0000 (10:44 -0700)]
staging: comedi: me4000: fix ai_write_chanlist()

Rename this function so it has namespace associated with the driver.

The last entry of the chanlist needs the ME4000_AI_LIST_LAST_ENTRY bit
set to end the list. Fix the function and tidy if up a bit.

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: me4000: simplify analog input range programming
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:51 +0000 (10:44 -0700)]
staging: comedi: me4000: simplify analog input range programming

The comedi_lrange table for the analog inputs is inverted compared
to the values that need to be written to the ME4000_AI_CHANNEL_LIST_REG
to select the range.

Create a macro, ME4000_AI_LIST_RANGE(), to handle the inversion. Remove
the old defines and simplify the code a bit.

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: me4000: remove unnecessary ME4000_AI_LIST_INPUT_SINGLE_ENDED
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:50 +0000 (10:44 -0700)]
staging: comedi: me4000: remove unnecessary ME4000_AI_LIST_INPUT_SINGLE_ENDED

This define evaluates to 0 and is OR'ed with the 'entry' value that is
written to the ME4000_AI_CHANNEL_LIST_REG when the channel aref is a
single-ended type (AREF_GROUND or AREF_COMMON). OR'ing a zero value is
pretty silly, just remove it.

Remove the switch() in me4000_ai_insn_read() to simplify the 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: me4000: rename local variables used for 'dev->private'
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:49 +0000 (10:44 -0700)]
staging: comedi: me4000: rename local variables used for 'dev->private'

In comedi drivers the local variable used for the dev->private pointer is
normally named 'devpriv'. For aesthetics, rename the variables in this
driver. Also, rename the struct to follow the norm.

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: me4000: refactor 'ai_sh_nchan' boardinfo
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:48 +0000 (10:44 -0700)]
staging: comedi: me4000: refactor 'ai_sh_nchan' boardinfo

Some of the boards supported by this driver can do analog input sample &
hold on 8 of the channels. The 'ai_sh_nchan' member of the boardinfo is
used to indicate which boards support this feature. To save a bit of space,
convert this member to a bit-field, 'can_do_sh_ai'. Note, this feature is
not currently supported.

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: me4000: refactor 'ao_fifo' boardinfo
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:47 +0000 (10:44 -0700)]
staging: comedi: me4000: refactor 'ao_fifo' boardinfo

This member of the boardinfo is always '4' for the boards that have an
analog output FIFO. Covert it to a bit-field, 'has_ao_fifo', 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: me4000: refactor 'ao_nchan' boardinfo
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:46 +0000 (10:44 -0700)]
staging: comedi: me4000: refactor 'ao_nchan' boardinfo

For the boards that have analog output capability, there are always
4 analog output channels. Convert the 'ao_nchan' member of the boardinfo
into a bit-field, 'has_ao', to save a bit of space and set the analog
output subdevice 'n_chan' to 4 when supported.

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: me4000: refactor 'ai_diff_nchan' boardinfo
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:45 +0000 (10:44 -0700)]
staging: comedi: me4000: refactor 'ai_diff_nchan' boardinfo

This member of the boardinfo is only used as a flag indicating that the
board supports differential analog inputs. Convert the member to a bit-
field to save a bit of space. For aesthetics, rename the member to
'can_do_diff_ai'.

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: me4000: make boardinfo flags bit-fields
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:44 +0000 (10:44 -0700)]
staging: comedi: me4000: make boardinfo flags bit-fields

Change the boardinfo 'has_counter' and 'ai_trig_analog' flags into
bit-fields 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: me4000: remove 'board' from me4000_ai_check_chanlist()
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:43 +0000 (10:44 -0700)]
staging: comedi: me4000: remove 'board' from me4000_ai_check_chanlist()

The maximum differential channel is half the subdevice 'n_chan'. Use
that instead and remove the need for the 'board' variable.

Also, the comedi core does no validate the aref flags. Add a check
to ensure that the subdevice actually supports the AREF_DIFF mode.

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: me4000: remove 'board' from me4000_ai_insn_read()
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:42 +0000 (10:44 -0700)]
staging: comedi: me4000: remove 'board' from me4000_ai_insn_read()

The 'board' pointer is only used in this function to verify that the
'chan' is valid for an aref of AREF_DIFF. For differential inputs, the
maximum channel is half the subdevice 'n_chan'. Use that instead and
remove the 'board' variable.

Also, the comedi core does not validate the aref flags. Add a check
to ensure that the subdevice actually supports the AREF_DIFF mode.

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: me4000: remove 'chan' check in me4000_ai_insn_read()
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:41 +0000 (10:44 -0700)]
staging: comedi: me4000: remove 'chan' check in me4000_ai_insn_read()

The comedi core validates that the 'chan' is valid for the subdevice
before calling the (*insn_read) operation. Remove the unnecessary check.

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: me4000: only set SDF_DIFF when supported
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:40 +0000 (10:44 -0700)]
staging: comedi: me4000: only set SDF_DIFF when supported

Some of the boards supported by this driver do not have differential analog
inputs. Only set the SDF_DIFF subdev_flag when the board supports 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: me4000: all board types have analog inputs
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:39 +0000 (10:44 -0700)]
staging: comedi: me4000: all board types have analog inputs

All the boards supported by this driver have analog inputs. They just
differ in the number of channels (32 or 16).

Always initialize the analog input subdevice in me4000_auto_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: me4000: remove 'dio_nchan' boardinfo
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:38 +0000 (10:44 -0700)]
staging: comedi: me4000: remove 'dio_nchan' boardinfo

All the boards supported by this driver have 32 digital I/O channels.
Remove the unnecessary boardinfo.

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 agowilc1000: wilc_wfi_cfgoperations.c: Fixed initialization of global boolean.
Daniel Machon [Tue, 4 Aug 2015 22:09:35 +0000 (00:09 +0200)]
wilc1000: wilc_wfi_cfgoperations.c: Fixed initialization of global boolean.

Globals are initialized to zero or NULL by GCC. No need to explicitly initialize them.

Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Fix style warning on header
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 20:33:23 +0000 (22:33 +0200)]
staging: lustre: Fix style warning on header

Fix checkpatch.pl warning:
WARNING: Use #include <linux/io.h> instead of <asm/io.h>

Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: obdclass: Use kasprintf
Shraddha Barke [Tue, 4 Aug 2015 20:22:45 +0000 (01:52 +0530)]
Staging: lustre: obdclass: Use kasprintf

This patch uses kasprintf which combines kzalloc and sprintf.
kasprintf also takes care of the size calculation.

Semantic patch used is as follows:

@@
expression a,flag;
expression list args;
statement S;
@@

 a =
- \(kmalloc\|kzalloc\)(...,flag)
+ kasprintf (flag,args)
  <... when != a
  if (a == NULL || ...) S
  ...>
- sprintf(a,args);

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: mgc: Replace comma with a semicolon
Shraddha Barke [Tue, 4 Aug 2015 17:50:51 +0000 (23:20 +0530)]
Staging: lustre: mgc: Replace comma with a semicolon

Replace comma between expression statements by a semicolon.
The semantic patch used is as follows:

@@
expression e1,e2;
@@
e1
- ,
+ ;
e2;

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: netlogic: Replace comma with a semicolon
Shraddha Barke [Tue, 4 Aug 2015 17:50:52 +0000 (23:20 +0530)]
Staging: netlogic: Replace comma with a semicolon

Replace comma between expression statements by a semicolon.
The semantic patch used is as follows:

@@
expression e1,e2;
@@
e1
- ,
+ ;
e2;

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: libcfs: Replace comma with a semicolon
Shraddha Barke [Tue, 4 Aug 2015 17:50:50 +0000 (23:20 +0530)]
Staging: lustre: libcfs: Replace comma with a semicolon

Replace comma between expression statements by a semicolon.
The semantic patch used is as follows:

@@
expression e1,e2;
@@
e1
- ,
+ ;
e2;

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: osc: Drop unnecessary cast on void *
Shraddha Barke [Tue, 4 Aug 2015 17:32:34 +0000 (23:02 +0530)]
Staging: lustre: osc: Drop unnecessary cast on void *

 This patch does away with the cast on void * as it is unnecessary.

Semantic patch used is as follows:

@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: lov: Drop unnecessary cast on void *
Shraddha Barke [Tue, 4 Aug 2015 17:32:35 +0000 (23:02 +0530)]
Staging: lustre: lov: Drop unnecessary cast on void *

This patch does away with the cast on void * as it is unnecessary.

Semantic patch used is as follows:

@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: libcfs: Drop unnecessary cast on void*
Shraddha Barke [Tue, 4 Aug 2015 17:32:33 +0000 (23:02 +0530)]
Staging: lustre: libcfs: Drop unnecessary cast on void*

This patch does away with the cast on void * as it is unnecessary.

Semantic patch used is as follows:

@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visornic: Convert to using napi
Neil Horman [Tue, 4 Aug 2015 19:09:47 +0000 (15:09 -0400)]
staging: unisys: visornic: Convert to using napi

Switch the visornic over to use napi.  Currently there is a kernel
thread that sits and waits on a wait queue to get notified of incoming
virtual interrupts. It would be nice if we could handle frame reception
using the standard napi processing instead.  This patch creates our napi
instance and has the rx thread schedule it

Given that the unisys hypervisor currently requires that queue servicing
be done by a polling loop that wakes up every 2ms, lets instead also
convert that to a timer, which is simpler, and allows us to remove all
the thread starting and stopping code.

Signed-off-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: wilc1000: remove space after '('
Chandra S Gorentla [Wed, 5 Aug 2015 16:41:57 +0000 (22:11 +0530)]
drivers: staging: wilc1000: remove space after '('

The character ' ' is removed after the character '('.  This fixes the
checkpatch.pl error - "space prohibited after that open
parenthesis '('".

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: wilc1000: use 'void' for no arguments functions
Chandra S Gorentla [Wed, 5 Aug 2015 16:41:55 +0000 (22:11 +0530)]
drivers: staging: wilc1000: use 'void' for no arguments functions

Added 'void' keyword in the paranthesis of function definitions, when
there are no arguments to the functions.  This fixes the checkpatch.pl
error - "Bad function definition 'function()' should probably be
function(void)".

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: wilc_cfgoperations.c: Fixed coding styles issues.
Daniel Machon [Wed, 5 Aug 2015 06:18:31 +0000 (08:18 +0200)]
staging: wilc1000: wilc_cfgoperations.c: Fixed coding styles issues.

Fixed coding styles issues with braces.

Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: wilc1000: Remove typedefs for struct
Shraddha Barke [Tue, 4 Aug 2015 19:59:22 +0000 (01:29 +0530)]
Staging: wilc1000: Remove typedefs for struct

The Linux kernel coding style guidelines suggest not using typedefs for
structure and enum types. This patch gets rid of the typedefs for
Ack_session_info_t.

The following Coccinelle semantic patch detects the cases for struct type:

@tn@
identifier i;
type td;
@@

-typedef
 struct i { ... }
-td
 ;

@@
type tn.td;
identifier tn.i;
@@

-td
+ struct i

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio_simple_dummy: Fix indentation errors
Lars Svensson [Wed, 5 Aug 2015 12:15:12 +0000 (14:15 +0200)]
staging: iio_simple_dummy: Fix indentation errors

Fixing indentation errors in
drivers/staging/iio/iio_simple_dummy_events.c.

Signed-off-by: Lars Svensson <lars1.svensson@sonymobile.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Fixed C99 style comment to C89 style.
Lior Pugatch [Tue, 4 Aug 2015 19:18:04 +0000 (22:18 +0300)]
staging: vt6655: Fixed C99 style comment to C89 style.

Patch created to satisfy checkpatch.pl

Signed-off-by: Lior Pugatch <buzz5800@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: fix up coding style warnings reported by checkpatch.pl.
Ting-Chih Hsiao [Tue, 4 Aug 2015 03:21:10 +0000 (11:21 +0800)]
staging: rtl8723au: fix up coding style warnings reported by checkpatch.pl.

remove spaces at the start of a line
align enum variable with other parameters

Signed-off-by: Ting-Chih Hsiao <s894330@hotmail.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre: Properly reference kthread_run instead of cfs_daemonize
Oleg Drokin [Tue, 4 Aug 2015 01:57:45 +0000 (21:57 -0400)]
staging/lustre: Properly reference kthread_run instead of cfs_daemonize

cfs_daemonize is long gone and replaced by a proper call to kthread_run,
so update the comment to reflect that fact.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/ptlrpc: Remove stray cfs_daemonize comment
Oleg Drokin [Tue, 4 Aug 2015 01:57:44 +0000 (21:57 -0400)]
staging/lustre/ptlrpc: Remove stray cfs_daemonize comment

Ever since daemonize was removed in 3.18, there are no longer
any flags passed to kthread_run.
Most of the comments were deleted, but this one lingered on
until now.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: improve comedi_check_chanlist() documentation
Ian Abbott [Wed, 5 Aug 2015 17:13:26 +0000 (18:13 +0100)]
staging: comedi: improve comedi_check_chanlist() documentation

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: do not return -ENOSYS.
Ted Chen [Tue, 4 Aug 2015 17:18:46 +0000 (01:18 +0800)]
staging: comedi: do not return -ENOSYS.

fixed coding style issue by replacing ENOSYS
with EIO because it means 'invalid syscall nr'
and nothing else.

Signed-off-by: Ted Chen <tedc.37zngo@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: android: timed_gpio.c: fix coding style errors
Jandy Gou [Wed, 5 Aug 2015 02:09:02 +0000 (10:09 +0800)]
Staging: android: timed_gpio.c: fix coding style errors

remove extra space and replace tab to space after a variable

Signed-off-by: Jandy Gou <qingsong.gou@ck-telecom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>