openwrt/staging/blogic.git
10 years agostaging: lustre: Cleanup variable declarations in mdc_enqueue()
Srikrishan Malik [Mon, 11 Aug 2014 18:27:39 +0000 (23:57 +0530)]
staging: lustre: Cleanup variable declarations in mdc_enqueue()

Changes:
- move const union vars to the top
- move rc to bottom
- do not initialize req
- set lvb_type to enum member instead of 0
- change __u64 to u64
- fix inconsistant columnization

Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: remove parentheses usage with return
Srikrishan Malik [Mon, 11 Aug 2014 18:27:38 +0000 (23:57 +0530)]
staging: lustre: remove parentheses usage with return

Fix the following checkpatch error:

ERROR: return is not a function, parentheses are not required

Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: move else on the same line as closing brace
Srikrishan Malik [Mon, 11 Aug 2014 18:27:37 +0000 (23:57 +0530)]
staging: lustre: move else on the same line as closing brace

Fix the following checkpatch error:

ERROR: else should follow close brace '}'

Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Fix misplaced opening brace warnings
Srikrishan Malik [Mon, 11 Aug 2014 18:27:36 +0000 (23:57 +0530)]
staging: lustre: Fix misplaced opening brace warnings

Fixes the following checkpatch error:

ERROR: that open brace { should be on the previous line

Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Added space between type name and *
Srikrishan Malik [Mon, 11 Aug 2014 18:27:35 +0000 (23:57 +0530)]
staging: lustre: Added space between type name and *

Fixes the following checkpatch error:

ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years ago] staging: lustre: fix multi line strings
Srikrishan Malik [Wed, 13 Aug 2014 14:01:16 +0000 (19:31 +0530)]
] staging: lustre: fix multi line strings

Fixes the following checkpatch warning:

WARNING: quoted string split across lines

Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: add blank lines after declarations
Srikrishan Malik [Mon, 11 Aug 2014 18:27:33 +0000 (23:57 +0530)]
staging: lustre: add blank lines after declarations

Fixes the following checkpatch warning:

WARNING: Missing a blank line after declarations

Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: replace c99 style comments with C89
Srikrishan Malik [Mon, 11 Aug 2014 18:27:32 +0000 (23:57 +0530)]
staging: lustre: replace c99 style comments with C89

Fixes the following checkpatch error:

ERROR: do not use C99 // comments

Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Add missing spaces around operators and braces.
Srikrishan Malik [Mon, 11 Aug 2014 18:27:31 +0000 (23:57 +0530)]
staging: lustre: Add missing spaces around operators and braces.

Fixes the following checkpatch errors:

ERROR: space required after that ',' (ctx:VxV)
ERROR: space required after that close brace '}'

Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: fix lines over 80 chars
Srikrishan Malik [Mon, 11 Aug 2014 18:27:30 +0000 (23:57 +0530)]
staging: lustre: fix lines over 80 chars

Fixes the following  checkpatch warning:

WARNING: line over 80 characters

Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: move open brace to next line after functions
Srikrishan Malik [Mon, 11 Aug 2014 18:27:29 +0000 (23:57 +0530)]
staging: lustre: move open brace to next line after functions

Fixes the following checkpatch error:

ERROR: open brace '{' following function declarations go on the next line

Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: remove spaces from start of line
Srikrishan Malik [Mon, 11 Aug 2014 18:27:28 +0000 (23:57 +0530)]
staging: lustre: remove spaces from start of line

Fixes the following checkpatch warning:

WARNING: please, no spaces at the start of a line

Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: remove space between function name and and open parenthesis
Srikrishan Malik [Mon, 11 Aug 2014 18:27:27 +0000 (23:57 +0530)]
staging: lustre: remove space between function name and and open parenthesis

Fixes following checkpatch warning:

WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: fix coding style issue: missing space after 'if'
Junien Fridrick [Sun, 10 Aug 2014 23:05:38 +0000 (23:05 +0000)]
staging: lustre: fix coding style issue: missing space after 'if'

Coding style issue reported by checkpatch.pl

Signed-off-by: Junien Fridrick <linux.kernel@junien.fridrick.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: add blank line after declaration
Ragnar B. Johannsson [Sun, 10 Aug 2014 22:23:50 +0000 (22:23 +0000)]
staging: vt6656: add blank line after declaration

Adds a blank line after declaration to comply with coding style.

Signed-off-by: Ragnar B. Johannsson <ragnar@igo.is>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: fix incorrect indentation
Ragnar B. Johannsson [Sun, 10 Aug 2014 22:23:49 +0000 (22:23 +0000)]
staging: vt6656: fix incorrect indentation

Use tabs, not spaces.

Signed-off-by: Ragnar B. Johannsson <ragnar@igo.is>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: remove unnecessary braces
Ragnar B. Johannsson [Sun, 10 Aug 2014 22:23:48 +0000 (22:23 +0000)]
staging: vt6656: remove unnecessary braces

Removes unnecessary braces to comply with coding style.

Signed-off-by: Ragnar B. Johannsson <ragnar@igo.is>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: remove typedef from struct vnt_private
Malcolm Priestley [Sun, 10 Aug 2014 14:47:03 +0000 (15:47 +0100)]
staging: vt6655: remove typedef from struct vnt_private

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: device_main Replace DEVICE_INFO with size of pointer
Malcolm Priestley [Sun, 10 Aug 2014 14:47:02 +0000 (15:47 +0100)]
staging: vt6655: device_main Replace DEVICE_INFO with size of pointer

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: rf/wpactl/wroute use struct vnt_private
Malcolm Priestley [Sun, 10 Aug 2014 14:47:01 +0000 (15:47 +0100)]
staging: vt6655: rf/wpactl/wroute use struct vnt_private

Replacing PSDevice.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: hostap/ioctl/iwctl use struct vnt_private
Malcolm Priestley [Sun, 10 Aug 2014 14:47:00 +0000 (15:47 +0100)]
staging: vt6655: hostap/ioctl/iwctl use struct vnt_private

Replacing PSDevice.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: bssdb/datarate/dpc/power/rxtx use struct vnt_private
Malcolm Priestley [Sun, 10 Aug 2014 14:46:59 +0000 (15:46 +0100)]
staging: vt6655: bssdb/datarate/dpc/power/rxtx use struct vnt_private

Replacing PSDevice.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: channel/wcmd/wctl/wmgr use struct vnt_private *
Malcolm Priestley [Sun, 10 Aug 2014 14:46:58 +0000 (15:46 +0100)]
staging: vt6655: channel/wcmd/wctl/wmgr use struct vnt_private *

Replacing PSDevice.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: card change PSDevice to struct vnt_private
Malcolm Priestley [Sun, 10 Aug 2014 14:46:57 +0000 (15:46 +0100)]
staging: vt6655: card change PSDevice to struct vnt_private

Repacing void *pDeviceHandler

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: baseband replace PSDevice
Malcolm Priestley [Sun, 10 Aug 2014 14:46:56 +0000 (15:46 +0100)]
staging: vt6655: baseband replace PSDevice

Coverting all functions to struct vnt_private.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: device.h use change __device_info to vnt_private
Malcolm Priestley [Sun, 10 Aug 2014 14:46:55 +0000 (15:46 +0100)]
staging: vt6655: device.h use change __device_info to vnt_private

Coverting all functions to struct vnt_private in device.h and device_main.c

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: upc.h replace read and write memory functions
Malcolm Priestley [Sun, 10 Aug 2014 11:22:02 +0000 (12:22 +0100)]
staging: vt6655: upc.h replace read and write memory functions

Update to the newer memory functions
readb -> ioread8
readw -> ioread16
readl -> ioread32
writeb -> iowrite8
writew -> iowrite16
writel -> iowrite32

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: upc.h: Remove unused macros
Malcolm Priestley [Sun, 10 Aug 2014 11:22:01 +0000 (12:22 +0100)]
staging: vt6655: upc.h: Remove unused macros

PCBv* are not used

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: CARDbSetBeaconPeriod call CARDbGetCurrentTSF to get TBTT
Malcolm Priestley [Sun, 10 Aug 2014 11:22:00 +0000 (12:22 +0100)]
staging: vt6655: CARDbSetBeaconPeriod call CARDbGetCurrentTSF to get TBTT

There is already a function to get next TBTT.

Replace code with CARDqGetNextTBTT.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: CARDqGetNextTBTT calculate qwTSF using do_div
Malcolm Priestley [Sun, 10 Aug 2014 11:21:59 +0000 (12:21 +0100)]
staging: vt6655: CARDqGetNextTBTT calculate qwTSF using do_div

Use do_div to compute equation as shown replacing existing code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: Replace and remove typedef QWORD/ DQWORD
Malcolm Priestley [Sun, 10 Aug 2014 11:21:58 +0000 (12:21 +0100)]
staging: vt6655: Replace and remove typedef QWORD/ DQWORD

Replace the variables with u64/__le64.

The endian variant is needed in some places endian correction is
needed.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: BSSvSecondTxData remove #if 1 else directive
Malcolm Priestley [Sun, 10 Aug 2014 11:21:57 +0000 (12:21 +0100)]
staging: vt6655: BSSvSecondTxData remove #if 1 else directive

There is a code alignment error after this directive realign
code

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: Remove TxInSleep macro
Malcolm Priestley [Sun, 10 Aug 2014 11:21:56 +0000 (12:21 +0100)]
staging: vt6655: Remove TxInSleep macro

TxInSleep is always enabled remove the macro and any
else code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: rxtx: Replace typedef struct tagSMICHDRHead
Malcolm Priestley [Sat, 9 Aug 2014 19:15:56 +0000 (20:15 +0100)]
staging: vt6655: rxtx: Replace typedef struct tagSMICHDRHead

With struct vnt_mic_hdr replacing pointer assigments in
s_vFillTxKey.

The size of new struture is the same as old with packing

Create the struture rxtx.h where it is only used.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: wpactl.c: Fix sparse warnings
Martin Berglund [Thu, 7 Aug 2014 22:08:34 +0000 (23:08 +0100)]
staging: vt6655: wpactl.c: Fix sparse warnings

Add missing __user macro casting in the function wpa_set_keys.
This is okay since the function handles the possibility of
param->u.wpa_key.key and param->u.wpa_key.seq pointing to
kernelspace using a flag, fcpfkernel.

Signed-off-by: Martin Berglund <martin@rogsta.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:r819xU: coding style: Fixed commenting style
Sanjeev Sharma [Fri, 8 Aug 2014 04:23:07 +0000 (09:53 +0530)]
staging:r819xU: coding style: Fixed commenting style

This is a patch to the r819xU_phyreg.h file that fixes
commenting style warning

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Remove unnecessary bit masking.
Andreas Schlick [Thu, 7 Aug 2014 17:20:50 +0000 (19:20 +0200)]
staging: rtl8723au: Remove unnecessary bit masking.

Signed-off-by: Andreas Schlick <ninox@posteo.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Move open braces to the previous line.
Andreas Schlick [Thu, 7 Aug 2014 17:20:49 +0000 (19:20 +0200)]
staging: rtl8723au: Move open braces to the previous line.

Correct coding style errors in rtw_efuse.c. checkpatch.pl reported:
ERROR: that open brace { should be on the previous line

Signed-off-by: Andreas Schlick <ninox@posteo.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Remove unnecessary 'return' statement
Konrad Zapalowicz [Wed, 6 Aug 2014 20:17:10 +0000 (22:17 +0200)]
staging: dgnc: Remove unnecessary 'return' statement

This commit fixes the checkpath warning 'void function return
statements are not generally useful' caused by the 'return' at the end
of 'void' function.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Fix missing blank line after declarations
Konrad Zapalowicz [Wed, 6 Aug 2014 20:17:09 +0000 (22:17 +0200)]
staging: dgnc: Fix missing blank line after declarations

This commit fixes the missing blank lines after declarations checkpath
warnings found in dgnc_cls.c file.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Remove 'volatile' modifier where it is not needed
Konrad Zapalowicz [Wed, 6 Aug 2014 19:01:26 +0000 (21:01 +0200)]
staging: dgnc: Remove 'volatile' modifier where it is not needed

This commit fixes the checkpath warning about misused 'volatile'
modifier. In this case the 'volatile' was not needed as it was used
for regular automatic variable. Thos commit removes the 'volatile'.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Fix braces {} are not necessary for single statement blocks
Konrad Zapalowicz [Wed, 6 Aug 2014 19:01:25 +0000 (21:01 +0200)]
staging: dgnc: Fix braces {} are not necessary for single statement blocks

This commit fixes the following checkpath warning in dgnc_neo.c file:
'braces {} are not necessary for single statement blocks'

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Fix that open brace { should be on the previous line
Konrad Zapalowicz [Wed, 6 Aug 2014 19:01:24 +0000 (21:01 +0200)]
staging: dgnc: Fix that open brace { should be on the previous line

This commit fixes the following checkpath error in dgnc_neo.c file:
'that open brace { should be on the previous line'

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Fix missing blank line after declarations
Konrad Zapalowicz [Wed, 6 Aug 2014 19:01:23 +0000 (21:01 +0200)]
staging: dgnc: Fix missing blank line after declarations

This commit deals with the checkapth warnings 'missing line after
declarations' in the dgnc_neo.c file.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Fix included header from 'asm'
Konrad Zapalowicz [Wed, 6 Aug 2014 19:01:22 +0000 (21:01 +0200)]
staging: dgnc: Fix included header from 'asm'

This commit fixes the checkpatch warning:

drivers/staging/dgnc/dgnc_neo.c:37:
    WARNING: Use #include <linux/io.h> instead of <asm/io.h>

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Update the TODO file
Konrad Zapalowicz [Wed, 6 Aug 2014 12:21:25 +0000 (14:21 +0200)]
staging: dgnc: Update the TODO file

It turned out that the TODO file contained the invalid information as
some of the work has already been done. This commit updates it with the
current status of what is left to be done.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Siplify the dgnc_start function
Konrad Zapalowicz [Wed, 6 Aug 2014 13:40:11 +0000 (15:40 +0200)]
staging: dgnc: Siplify the dgnc_start function

This commit slightly simplifies the sgnc_start() function by
rearranging it. As a result the indentation level is reduced.
This is not the functional change.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Move utility functions out of dgnc_driver.c
Konrad Zapalowicz [Wed, 6 Aug 2014 12:21:23 +0000 (14:21 +0200)]
staging: dgnc: Move utility functions out of dgnc_driver.c

This commit moves the utility functions out of dgnc_driver.c file and
puts them in the new dgnc_utils.{c,h} files. The accompanying changes
adjust the existing code to work with this design.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Remove unnecessary functions from dgnc_driver.c
Konrad Zapalowicz [Wed, 6 Aug 2014 12:21:22 +0000 (14:21 +0200)]
staging: dgnc: Remove unnecessary functions from dgnc_driver.c

This commit slightly cleans up the dgnc_driver.c file. The changes
include removing one-line proxy functions as they were not needed.
Additionaly the pci 'remove' function is deleted because it was no
need for it.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Fix frame size is larger than 1024B
Konrad Zapalowicz [Wed, 6 Aug 2014 12:21:21 +0000 (14:21 +0200)]
staging: dgnc: Fix frame size is larger than 1024B

This comit fixes the following sparse warnign:

drivers/staging/dgnc/dgnc_tty.c:572:1:
    warning: the frame size of 1060 bytes is larger than 1024 bytes
    [-Wframe-larger-than=]

This was caused by having buffer as an automatic variable. This commit
moves it from the stack to the heap.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Fix no spaces before tabs checkpath warning
Konrad Zapalowicz [Wed, 6 Aug 2014 12:21:20 +0000 (14:21 +0200)]
staging: dgnc: Fix no spaces before tabs checkpath warning

This commit corrects the 'no space before tabs' checkpath warning.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: Fix externs should be avoided in the .c files
Konrad Zapalowicz [Tue, 12 Aug 2014 06:08:37 +0000 (08:08 +0200)]
staging: dgnc: Fix externs should be avoided in the .c files

This commit fixes the following checkpatch warnings:

WARNING: externs should be avoided in .c files
    #80: FILE: drivers/staging/dgnc/dgnc_driver.c:80:
        +int            dgnc_init_module(void);
    #81: FILE: drivers/staging/dgnc/dgnc_driver.c:81:
        +void           dgnc_cleanup_module(void);

This was caused by putting the declarations for module init and module
exit fucntions on the top of the file. The fix removes these
declarations plus it also corrects the type of the init/exit functions.

Due to the dependency between init and exit functions the
dgnc_cleanup_module had to be put first.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: nokia_h4p: removed unnecessary return statement in nokia_fw.c
Lars Hamre [Fri, 8 Aug 2014 01:21:42 +0000 (21:21 -0400)]
Staging: nokia_h4p: removed unnecessary return statement in nokia_fw.c

This is a patch to the nokia_fw.c file that removes an unnecessary return statement found by the checkpatch.pl tool

Signed-off-by: Lars Hamre <hamham91@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: wlan-ng: fix sparse warning in prism2fw.c
A Raghavendra Rao [Thu, 7 Aug 2014 08:40:39 +0000 (14:10 +0530)]
Staging: wlan-ng: fix sparse warning in prism2fw.c

Fix the following sparse warning :

In file included from drivers/staging/wlan-ng/prism2usb.c:5:0:
drivers/staging/wlan-ng/prism2fw.c: In function
‘read_cardpda.constprop.43’:
drivers/staging/wlan-ng/prism2fw.c:792:1: warning: the frame size of
1068 bytes is larger than 1024 bytes [-Wframe-larger-than=]

The variable to 'struct p80211msg_p2req_readpda' was previously being created
on the stack, which inturn exeeded the frame size limit, resulting in a
sparse warning. This patch alloctes the memory to the structure dynamically
and the operations are left unchanged.

Signed-off-by: A Raghavendra Rao <arrao@cdac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: slicoss: fix a blank line coding style issue
Quentin Lambert [Mon, 4 Aug 2014 19:10:24 +0000 (21:10 +0200)]
staging: slicoss: fix a blank line coding style issue

Add 2 missing blank lines after declaration.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rts5208: Remove CONFIG_RTS5208_DEBUG option
Fabio Falzoi [Tue, 5 Aug 2014 21:24:18 +0000 (23:24 +0200)]
Staging: rts5208: Remove CONFIG_RTS5208_DEBUG option

CONFIG_RTS5208_DEBUG is no more needed, we rely on dynamic debug config options
instead.

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rts5208: Use dev_dbg and print_hex_dump_bytes to dump memory
Fabio Falzoi [Tue, 5 Aug 2014 21:24:17 +0000 (23:24 +0200)]
Staging: rts5208: Use dev_dbg and print_hex_dump_bytes to dump memory

Use dev_dbg with %*ph format specifier and print_hex_dump_bytes to dump memory
instead of relying on custom macro.

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: imx-drm: fix a blank line coding style issue
Quentin Lambert [Mon, 4 Aug 2014 19:07:07 +0000 (21:07 +0200)]
staging: imx-drm: fix a blank line coding style issue

Add missing blank lines after declaration.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoimx-drm: imx-drm-core: delete unneeded test before of_node_put
Julia Lawall [Fri, 8 Aug 2014 10:07:50 +0000 (12:07 +0200)]
imx-drm: imx-drm-core: delete unneeded test before of_node_put

Of_node_put supports NULL as its argument, so the initial test is not
necessary.

Suggested by Uwe Kleine-König.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e;
@@

-if (e)
   of_node_put(e);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: Use list helpers
Christoph Jaeger [Mon, 4 Aug 2014 12:54:56 +0000 (14:54 +0200)]
staging: ozwpan: Use list helpers

Make use of the various list helper functions to improve readability.

Signed-off-by: Christoph Jaeger <email@christophjaeger.info>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: Use slab cache for oz_tx_frame allocation
Christoph Jaeger [Fri, 8 Aug 2014 06:01:09 +0000 (08:01 +0200)]
staging: ozwpan: Use slab cache for oz_tx_frame allocation

Use a slab cache rather than rolling our own free list.

Signed-off-by: Christoph Jaeger <email@christophjaeger.info>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: Use slab cache for oz_elt_info allocation
Christoph Jaeger [Fri, 8 Aug 2014 06:00:42 +0000 (08:00 +0200)]
staging: ozwpan: Use slab cache for oz_elt_info allocation

Use a slab cache rather than rolling our own free list.

Signed-off-by: Christoph Jaeger <email@christophjaeger.info>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: Use slab cache for oz_urb_link allocation
Christoph Jaeger [Fri, 8 Aug 2014 05:59:24 +0000 (07:59 +0200)]
staging: ozwpan: Use slab cache for oz_urb_link allocation

Use a slab cache rather than rolling our own free list.

Signed-off-by: Christoph Jaeger <email@christophjaeger.info>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: Simplify app interface
Christoph Jaeger [Mon, 4 Aug 2014 12:54:52 +0000 (14:54 +0200)]
staging: ozwpan: Simplify app interface

Simplify the somewhat overcomplicated application interface; improves
readability and saves a bunch of lines.

Use designated struct initializers for clarity.

Signed-off-by: Christoph Jaeger <email@christophjaeger.info>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: Remove dead code
Christoph Jaeger [Mon, 4 Aug 2014 12:54:51 +0000 (14:54 +0200)]
staging: ozwpan: Remove dead code

No need to return a value from elt_buf_init().

Signed-off-by: Christoph Jaeger <email@christophjaeger.info>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: Remove redundant initialization
Christoph Jaeger [Mon, 4 Aug 2014 12:54:50 +0000 (14:54 +0200)]
staging: ozwpan: Remove redundant initialization

Member 'ops' has already been initialized by calling cdev_init().

Signed-off-by: Christoph Jaeger <email@christophjaeger.info>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: Remove unused OZ_MAX_TIMER_POOL_SIZE
Christoph Jaeger [Mon, 4 Aug 2014 12:54:49 +0000 (14:54 +0200)]
staging: ozwpan: Remove unused OZ_MAX_TIMER_POOL_SIZE

OZ_MAX_TIMER_POOL_SIZE is not used anywhere; remove it.

Signed-off-by: Christoph Jaeger <email@christophjaeger.info>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: Fix typo in typedef
Christoph Jaeger [Mon, 4 Aug 2014 12:54:48 +0000 (14:54 +0200)]
staging: ozwpan: Fix typo in typedef

Signed-off-by: Christoph Jaeger <email@christophjaeger.info>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ozwpan: Add module parameter description
Christoph Jaeger [Mon, 4 Aug 2014 12:54:47 +0000 (14:54 +0200)]
staging: ozwpan: Add module parameter description

Signed-off-by: Christoph Jaeger <email@christophjaeger.info>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: nokia_h4p: fix %d confusingly prefixed with 0x in format string
Hans Wennborg [Mon, 4 Aug 2014 00:20:49 +0000 (17:20 -0700)]
staging: nokia_h4p: fix %d confusingly prefixed with 0x in format string

Signed-off-by: Hans Wennborg <hans@hanshq.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8821ae: fix %d confusingly prefixed with 0x in format strings
Hans Wennborg [Mon, 4 Aug 2014 00:21:06 +0000 (17:21 -0700)]
staging: rtl8821ae: fix %d confusingly prefixed with 0x in format strings

Signed-off-by: Hans Wennborg <hans@hanshq.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers: staging: lustre: fix sparse warnings / delete unused function
Benedict Boerger [Fri, 8 Aug 2014 16:26:22 +0000 (18:26 +0200)]
drivers: staging: lustre: fix sparse warnings / delete unused function

drivers: staging: lustre: fix sparse warning: symbol XYZ was
not declared. Should it be static?

This was done by declaring them static. This could be done because the functions
were used only in this file.

Deleted the function lnet_print_text_bufs because it were unused.

Compiled without an error.
Done to complete a eudyptula task.

Signed-off-by: Benedict Boerger <benedict.boerger@cs.tu-dortmund.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: lustre: checkpatch: remove blank spaces
Tom Wales [Sun, 3 Aug 2014 19:41:44 +0000 (20:41 +0100)]
Staging: lustre: checkpatch: remove blank spaces

Remove spaces between the function names and open paranthesis and use the kernel coding style.

Signed-off-by: Tom Wales <twales518@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: remove unused function.
Fernando Apesteguia [Tue, 5 Aug 2014 19:10:19 +0000 (21:10 +0200)]
staging: rtl8192u: remove unused function.

Remove ComputeTxTime since it is not used.

Signed-off-by: Fernando Apesteguia <fernando.apesteguia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8188eu: Missing a blank line after declarations.
Adrian Remonda [Mon, 4 Aug 2014 22:30:17 +0000 (00:30 +0200)]
Staging: rtl8188eu: Missing a blank line after declarations.

This is a patch to the rtl8188e_xmit.c file that fixes up a missing
blank line warning found by the checkpatch.pl tool.

Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192ee: Fix RT_TRACE #define and uses
Joe Perches [Sun, 3 Aug 2014 22:57:26 +0000 (15:57 -0700)]
staging: rtl8192ee: Fix RT_TRACE #define and uses

RT_TRACE uses require unnecessary parentheses.

Fix the #define and remove the uses.

Neaten the RT_TRACE lines and multi-line argument wrapping.

dynamic debug can add KBUILD_MODNAME and __func__ so remove those
from the #define.

Use a single statement pr_debug instead of pr_debug and pr_cont
which doesn't support dynamic debug anyway.

Miscellaneous grammar and spelling fixes on the RT_TRACE uses.

Compile tested only.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: remove misc. unused defines
Antoine Schweitzer-Chaput [Tue, 24 Jun 2014 18:41:43 +0000 (20:41 +0200)]
staging: rtl8192u: remove misc. unused defines

Signed-off-by: Antoine Schweitzer-Chaput <antoine@schweitzer-chaput.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: remove unused define LOOP_TEST
Antoine Schweitzer-Chaput [Tue, 24 Jun 2014 18:41:42 +0000 (20:41 +0200)]
staging: rtl8192u: remove unused define LOOP_TEST

Signed-off-by: Antoine Schweitzer-Chaput <antoine@schweitzer-chaput.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: remove unused define USB_RX_AGGREGATION_SUPPORT
Antoine Schweitzer-Chaput [Tue, 24 Jun 2014 18:41:41 +0000 (20:41 +0200)]
staging: rtl8192u: remove unused define USB_RX_AGGREGATION_SUPPORT

Also remove related unreachable code.

Signed-off-by: Antoine Schweitzer-Chaput <antoine@schweitzer-chaput.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: remove unused define USB_TX_DRIVER_AGGREGATION_ENABLE
Antoine Schweitzer-Chaput [Tue, 24 Jun 2014 18:41:40 +0000 (20:41 +0200)]
staging: rtl8192u: remove unused define USB_TX_DRIVER_AGGREGATION_ENABLE

Also remove the unreachable code.

Signed-off-by: Antoine Schweitzer-Chaput <antoine@schweitzer-chaput.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: remove define always set USE_ONE_PIPE
Antoine Schweitzer-Chaput [Tue, 24 Jun 2014 18:41:39 +0000 (20:41 +0200)]
staging: rtl8192u: remove define always set USE_ONE_PIPE

Also remove the code previously under #ifndef USE_ONE_PIPE.

Signed-off-by: Antoine Schweitzer-Chaput <antoine@schweitzer-chaput.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: remove unused define DEBUG_EPROM
Antoine Schweitzer-Chaput [Tue, 24 Jun 2014 18:41:38 +0000 (20:41 +0200)]
staging: rtl8192u: remove unused define DEBUG_EPROM

Also remove the code now unreachable.

Signed-off-by: Antoine Schweitzer-Chaput <antoine@schweitzer-chaput.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: add NI USB-6501 support
Luca Ellero [Thu, 7 Aug 2014 07:10:25 +0000 (09:10 +0200)]
staging: comedi: add NI USB-6501 support

Enable support for the National Instruments USB-6501 module.

The NI USB-6501 is a Full-Speed USB 2.0 (12 Mbit/s) device that
provides 24 digital I/O lines channels and one 32-bit counter.

This is a preliminary version:
GPIO: works
counter: doesn't work

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: fixing coding style problems
Niklas Svensson [Wed, 6 Aug 2014 17:55:10 +0000 (19:55 +0200)]
staging: comedi: fixing coding style problems

This patch fixes warnings of checkpatch.pl script:

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around devpriv->timer
+        init_timer(&(devpriv->timer));

CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
+        dev_info(dev->class_dev,
+                "%s: %i microvolt, %li microsecond waveform attached\n",

Task of Eudyptula challenge.

Signed-off-by: Niklas Svensson <nks@flawful.org>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_dio200: remove unnecessary local variable
H Hartley Sweeten [Fri, 1 Aug 2014 20:07:04 +0000 (13:07 -0700)]
staging: comedi: amplc_dio200: remove unnecessary local variable

The local variable 'irq' is not necessary in dio200_attach(). Just
pass the it->options[1] value directly.

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>
10 years agostaging: comedi: amplc_dio200.h: remove 'mainsize' from boardinfo
H Hartley Sweeten [Fri, 1 Aug 2014 20:07:03 +0000 (13:07 -0700)]
staging: comedi: amplc_dio200.h: remove 'mainsize' from boardinfo

This member of the boardinfo is not used by the drivers. 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>
10 years agostaging: comedi: amplc_dio200_pci: remove 'mainsize' from PCI boardinfo
H Hartley Sweeten [Fri, 1 Aug 2014 20:07:02 +0000 (13:07 -0700)]
staging: comedi: amplc_dio200_pci: remove 'mainsize' from PCI boardinfo

The 'mainsize' member in the boardinfo for the DIO200 PCI boards is only used
for a sanity check of the pci_resource_len(). This sanity check is not needed.

Remove the sanity check along with the 'mainsize' values in the 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>
10 years agostaging: comedi: amplc_dio200: remove 'mainsize' from ISA boardinfo
H Hartley Sweeten [Fri, 1 Aug 2014 20:07:01 +0000 (13:07 -0700)]
staging: comedi: amplc_dio200: remove 'mainsize' from ISA boardinfo

All the ISA DIO200 boards have an i/o region size of 0x20 (DIO200_IO_SIZE).
Remove the boardinfo and open code the size in the comedi_request_region()
call.

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>
10 years agostaging: comedi: amplc_dio200: remove 'bustype' from boardinfo
H Hartley Sweeten [Fri, 1 Aug 2014 20:07:00 +0000 (13:07 -0700)]
staging: comedi: amplc_dio200: remove 'bustype' from boardinfo

This member of the boardinfo is not used by the driver. 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>
10 years agostaging: comedi: amplc_dio200: remove private data
H Hartley Sweeten [Fri, 1 Aug 2014 20:06:59 +0000 (13:06 -0700)]
staging: comedi: amplc_dio200: remove private data

The private data in this driver only has one member, 'intr_sd', which is
the index to the interrupt subdevice.

This member is initialized during the attach of the driver when the sd_intr
subdevice is detected in the boadinfo 'layout'. The member is then used in
the interrupt handler to get the pointer to the subdevice.

This member is not necessary. The comedi_device 'read_subdev' is also
initialized during the attach. This can be used in the interrupt handler
to get the subdevice pointer.

Refactor the code to not require the private data and remove the struct
and its allocations.

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>
10 years agostaging: comedi: amplc_pci224: no need to comedi_set_hw_dev() here
Ian Abbott [Thu, 31 Jul 2014 13:47:55 +0000 (14:47 +0100)]
staging: comedi: amplc_pci224: no need to comedi_set_hw_dev() here

The comedi core module calls `comedi_set_hw_dev()` to associate the
hardware `struct device` with the `struct comedi_device` before it calls
the comedi driver's "auto_attach" hook `pci224_auto_attach()`.  There is
no need for `pci224_auto_attach()` to call `comedi_set_hw_dev()` itself,
so remove the call.

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>
10 years agostaging: comedi: amplc_pci224: absorb pci224_attach_common()
Ian Abbott [Thu, 31 Jul 2014 13:47:54 +0000 (14:47 +0100)]
staging: comedi: amplc_pci224: absorb pci224_attach_common()

`pci224_attach_common()` is now only called from `pci225_auto_attach()`,
so absorb it into that function.

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>
10 years agostaging: comedi: amplc_pci224: remove PCI_DEVICE_ID_... macros
Ian Abbott [Thu, 31 Jul 2014 13:47:53 +0000 (14:47 +0100)]
staging: comedi: amplc_pci224: remove PCI_DEVICE_ID_... macros

The macros `PCI_DEVICE_ID_AMPLICON_PCI224` and
`PCI_DEVICE_ID_AMPLICON_PCI234` are only used in the PCI module device
table `amplc_pci224_pci_table[]`.  Just expand the macros where they are
used and remove them.  The macro `PCI_DEVICE_ID_INVALID` is no longer
used either, so remove it.

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>
10 years agostaging: comedi: amplc_pci224: put board indices in PCI driver_data
Ian Abbott [Mon, 4 Aug 2014 11:14:28 +0000 (12:14 +0100)]
staging: comedi: amplc_pci224: put board indices in PCI driver_data

The `driver_data` member value from the matched entry of the PCI module
device table `amplc_pci224_pci_table[]` is passed through to our comedi
"auto_attach" handler, `pci224_auto_attach()`.  Use that to index
directly into our static board data array `pci224_boards[]` instead of
calling `pci224_find_pci_board()` to search for the entry matching the
PCI device ID.  That function can be removed.  The `devid` and `model`
members of `struct pci224_board` are no longer needed either and can be
removed.

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>
10 years agostaging: comedi: amplc_pci224: no need to manipulate PCI ref count
Ian Abbott [Thu, 31 Jul 2014 13:47:51 +0000 (14:47 +0100)]
staging: comedi: amplc_pci224: no need to manipulate PCI ref count

This driver no longer supports a "legacy" attach mechanism that searches
for a suitable PCI device and increments it's reference count, but since
the common "detach" handler `pci224_detach()` still has a left-over
`pci_dev_put()`, a matching `pci_dev_get()` is needed in the
"auto_attach" handler `pci224_auto_attach()`.  There is no longer any
reason to "get" and "put" the PCI device, so those calls can be removed.

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>
10 years agostaging: comedi: amplc_pci224: remove "legacy" attach mechanism
Ian Abbott [Thu, 31 Jul 2014 13:47:50 +0000 (14:47 +0100)]
staging: comedi: amplc_pci224: remove "legacy" attach mechanism

Since the driver no longer supports options in its "legacy" attach
mechanism to describe the jumper settings (or any options beyond
restricting a PCI search to a particular bus and/or slot), there is no
need to retain this mechanism in the driver.  Remove the comedi driver
"attach" handler `pci224_attach()`, and the now unused
`pci224_find_pci_dev()`.  Also, remove the "wildcard" entry from the
board table `pci224_boards[]` as it is no longer needed.

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>
10 years agostaging: comedi: amplc_pci224: remove options to select output ranges
Ian Abbott [Thu, 31 Jul 2014 13:47:49 +0000 (14:47 +0100)]
staging: comedi: amplc_pci224: remove options to select output ranges

When attaching a PCI224 or PCI234 manually via the `COMEDI_DEVCONFIG`
ioctl, there are several options the user can supply that describe the
state of the hardware jumpers (LK1 for PCI224, LK1 thru LK5 for PCI234).
These options control how the driver sets up the AO range tables for the
device.  Those options are useless when the board is attached
automatically via the PCI driver probe function
`amplc_pci225_pci_probe()`, `comedi_pci_auto_config()`, and the
comedi driver "auto_attach" handler `pci224_auto_attach()`.

Rip out the range table selection options and use a single, static range
table per board type, containing all the software- and
hardware-selectable ranges for that board.  The PCI234 used to have a
per-channel `range_table_list` rather than an all-channel `range_table`,
as the jumpers selected different ranges for all channels.  Now that the
channels are using a unified range table, use an all-channel
`range_table` instead.

When checking the channel list for an asynchronous command in
`pci224_ao_check_chanlist()` make sure the ranges specified in the list
have compatible jumper settings.  We don't know how the jumpers are
actually set, but we can at least avoid conflicting settings.

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>
10 years agostaging: comedi: amplc_pci224: no need for '&function'
Ian Abbott [Thu, 31 Jul 2014 13:47:48 +0000 (14:47 +0100)]
staging: comedi: amplc_pci224: no need for '&function'

Remove the "address-of" operator when the operand is a function.

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>
10 years agostaging: comedi: amplc_pci224: reduce leading whitespace in a few places
Ian Abbott [Thu, 31 Jul 2014 13:47:47 +0000 (14:47 +0100)]
staging: comedi: amplc_pci224: reduce leading whitespace in a few places

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>
10 years agostaging: comedi: amplc_pci224: remove some unnecessary parentheses
Ian Abbott [Thu, 31 Jul 2014 13:47:46 +0000 (14:47 +0100)]
staging: comedi: amplc_pci224: remove some unnecessary parentheses

Remove some pairs of parentheses that don't really improve readability.

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>