openwrt/staging/blogic.git
10 years agostaging: xillybus: Removed outdated part in README
Eli Billauer [Thu, 17 Jul 2014 14:53:20 +0000 (17:53 +0300)]
staging: xillybus: Removed outdated part in README

The dedicated memory management routines have been replaced with devres API,
so the related part is removed from the doc.

Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: Fix if-else coding style errors
Eli Billauer [Thu, 17 Jul 2014 14:53:19 +0000 (17:53 +0300)]
staging: xillybus: Fix if-else coding style errors

According to Documentation/CodingStyle, when one branch of an if-else
statement has multiple statements, both branches should be enclosed in curly
brackets.

Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_labpc.h: checkpatch.pl cleanup (unnecessary space)
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:58 +0000 (11:22 -0700)]
staging: comedi: ni_labpc.h: checkpatch.pl cleanup (unnecessary space)

Fix the checkpatch.pl warning:

WARNING: Unnecessary space before function pointer arguments

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_tio: checkpatch.pl cleanup (braces not necessary)
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:57 +0000 (11:22 -0700)]
staging: comedi: ni_tio: checkpatch.pl cleanup (braces not necessary)

Fix the checkpatch.pl warnings:

WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_common: checkpatch.pl cleanup (braces not necessary)
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:56 +0000 (11:22 -0700)]
staging: comedi: ni_mio_common: checkpatch.pl cleanup (braces not necessary)

Fix the checkpatch.pl warnings:

WARNING: braces {} are not necessary for single statement blocks
WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_660x: checkpatch.pl cleanup (space prohibited)
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:55 +0000 (11:22 -0700)]
staging: comedi: ni_660x: checkpatch.pl cleanup (space prohibited)

Fix the checkpatch.pl warning:

WARNING: space prohibited before semicolon

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_660x: checkpatch.pl cleanup (trailing whitespace)
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:54 +0000 (11:22 -0700)]
staging: comedi: ni_660x: checkpatch.pl cleanup (trailing whitespace)

Fix the checkpatch.pl error:

ERROR: trailing whitespace

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl724: checkpatch.pl cleanup (foo*/foo *)
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:53 +0000 (11:22 -0700)]
staging: comedi: pcl724: checkpatch.pl cleanup (foo*/foo *)

Fix the checkpatch.pl error:

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

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: serial2000: checkpatch.pl cleanup (kmalloc_array)
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:52 +0000 (11:22 -0700)]
staging: comedi: serial2000: checkpatch.pl cleanup (kmalloc_array)

Fix the checkpatch.pl warning:

WARNING: Prefer kmalloc_array over kmalloc with multiply

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: me4000: checkpatch.pl cleanup (complex macro)
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:51 +0000 (11:22 -0700)]
staging: comedi: me4000: checkpatch.pl cleanup (complex macro)

Fix the checkpatch.pl error:

ERROR: Macros with complex values should be enclosed in parenthesis

This define is not used in the driver. Just remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: das1800: remove 'volatile' from private data
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:50 +0000 (11:22 -0700)]
staging: comedi: das1800: remove 'volatile' from private data

As indicated by checkpatch.pl, "WARNING: Use of volatile is usually
wrong: ...". The variables in the private data that are marked
volatile don't need to be. Remove the volatile.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: das16m1: remove 'volatile' from private data
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:49 +0000 (11:22 -0700)]
staging: comedi: das16m1: remove 'volatile' from private data

As indicated by checkpatch.pl, "WARNING: Use of volatile is usually
wrong: ...". The variables in the private data that are marked
volatile don't need to be. Remove the volatile.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: daqboard2000: checkpatch.pl cleanup (space before tab)
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:48 +0000 (11:22 -0700)]
staging: comedi: daqboard2000: checkpatch.pl cleanup (space before tab)

Fix these checkpatch.pl warnings:

WARNING: please, no space before tabs

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: cb_pcidas64: remove 'volatile' from set_dac_range_bits() param
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:47 +0000 (11:22 -0700)]
staging: comedi: cb_pcidas64: remove 'volatile' from set_dac_range_bits() param

As indicated by checkpatch.pl, "WARNING: Use of volatile is usually
wrong: ...". The 'bits' parameter to this function does not need to
be volatile.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: cb_pcidas64: remove 'volatile' from private data
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:46 +0000 (11:22 -0700)]
staging: comedi: cb_pcidas64: remove 'volatile' from private data

As indicated by checkpatch.pl, "WARNING: Use of volatile is usually
wrong: ...". The variables in the private data that are marked
volatile don't need to be. Remove the volatile.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amcc_s5933.h: checkpatch.pl cleanup (space prohibited)
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:45 +0000 (11:22 -0700)]
staging: comedi: amcc_s5933.h: checkpatch.pl cleanup (space prohibited)

Fix this checkpatch.pl warning:

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

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adv_pci_dio: checkpatch.pl cleanup (fallthrough)
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:44 +0000 (11:22 -0700)]
staging: comedi: adv_pci_dio: checkpatch.pl cleanup (fallthrough)

Fix these checkpatch.pl warnings:

WARNING: Possible switch case/default not preceeded by break or fallthrough comment

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adv_pci_dio: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:22:43 +0000 (11:22 -0700)]
staging: comedi: adv_pci_dio: checkpatch.pl cleanup (missing blank line)

Fix this checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_tio: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:02:10 +0000 (11:02 -0700)]
staging: comedi: ni_tio: checkpatch.pl cleanup (missing blank line)

Fix the checkpatch.pl warnings:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: mite: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:02:09 +0000 (11:02 -0700)]
staging: comedi: mite: checkpatch.pl cleanup (missing blank line)

Fix the checkpatch.pl warnings:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_common: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:02:08 +0000 (11:02 -0700)]
staging: comedi: ni_mio_common: checkpatch.pl cleanup (missing blank line)

Fix the checkpatch.pl warnings:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_pcidio: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:02:07 +0000 (11:02 -0700)]
staging: comedi: ni_pcidio: checkpatch.pl cleanup (missing blank line)

Fix the checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_660x: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:02:06 +0000 (11:02 -0700)]
staging: comedi: ni_660x: checkpatch.pl cleanup (missing blank line)

Fix the checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: multiq3: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:02:05 +0000 (11:02 -0700)]
staging: comedi: multiq3: checkpatch.pl cleanup (missing blank line)

Fix the checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcmuio: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:02:04 +0000 (11:02 -0700)]
staging: comedi: pcmuio: checkpatch.pl cleanup (missing blank line)

Fix the checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_at_a2150: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:02:03 +0000 (11:02 -0700)]
staging: comedi: ni_at_a2150: checkpatch.pl cleanup (missing blank line)

Fix the checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: serial2000: reduce indent level of serial2002_setup_subdevs()
H Hartley Sweeten [Wed, 16 Jul 2014 18:02:02 +0000 (11:02 -0700)]
staging: comedi: serial2000: reduce indent level of serial2002_setup_subdevs()

Tidy up this function a bit to reduce the indent level.

This also fixex the checkpatch.pl warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: serial2000: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:02:01 +0000 (11:02 -0700)]
staging: comedi: serial2000: checkpatch.pl cleanup (missing blank line)

Fix the checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: comedi_test: checkpatch.pl cleanup (break is not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 18:02:00 +0000 (11:02 -0700)]
staging: comedi: comedi_test: checkpatch.pl cleanup (break is not useful)

Fix the checkpatch.pl warning:

WARNING: break is not useful after a goto or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: jr3_pci: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:01:59 +0000 (11:01 -0700)]
staging: comedi: jr3_pci: checkpatch.pl cleanup (missing blank line)

Fix checkpatch.pl warnings:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: dt9812: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:01:58 +0000 (11:01 -0700)]
staging: comedi: dt9812: checkpatch.pl cleanup (missing blank line)

Fix checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: dt2815: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:01:57 +0000 (11:01 -0700)]
staging: comedi: dt2815: checkpatch.pl cleanup (missing blank line)

Fix checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: das1800: checkpatch.pl cleanup (void function return)
H Hartley Sweeten [Wed, 16 Jul 2014 18:01:56 +0000 (11:01 -0700)]
staging: comedi: das1800: checkpatch.pl cleanup (void function return)

Fix the checkpatch.pl warning:

WARNING: void function return statements are not generally useful

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: das16: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:01:55 +0000 (11:01 -0700)]
staging: comedi: das16: checkpatch.pl cleanup (missing blank line)

Fix thess checkpatch.pl warnings:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: cd_pcidas64: checkpatch.pl cleanup (void function return)
H Hartley Sweeten [Wed, 16 Jul 2014 18:01:54 +0000 (11:01 -0700)]
staging: comedi: cd_pcidas64: checkpatch.pl cleanup (void function return)

Fix the checkpatch.pl warning:

WARNING: void function return statements are not generally useful

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: cb_pcidas64: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:01:53 +0000 (11:01 -0700)]
staging: comedi: cb_pcidas64: checkpatch.pl cleanup (missing blank line)

Fix this checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pci230: checkpatch.pl cleanup (void function return)
H Hartley Sweeten [Wed, 16 Jul 2014 18:01:52 +0000 (11:01 -0700)]
staging: comedi: amplc_pci230: checkpatch.pl cleanup (void function return)

Fix the checkpatch.pl warning in this file:

WARNING: void function return statements are not generally useful

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:01:51 +0000 (11:01 -0700)]
staging: comedi: amplc_pc236: checkpatch.pl cleanup (missing blank line)

Fix this checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adv_pci1723: checkpatch.pl cleanup (missing blank line)
H Hartley Sweeten [Wed, 16 Jul 2014 18:01:50 +0000 (11:01 -0700)]
staging: comedi: adv_pci1723: checkpatch.pl cleanup (missing blank line)

Fix this checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: 8253.h: checkpatch.pl cleanup (void function return)
H Hartley Sweeten [Wed, 16 Jul 2014 18:01:49 +0000 (11:01 -0700)]
staging: comedi: 8253.h: checkpatch.pl cleanup (void function return)

Fix the checkpatch.pl warning in this file:

WARNING: void function return statements are not generally useful

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: adl_pci9118: a language issue fixed
Sam Asadi [Wed, 16 Jul 2014 20:23:56 +0000 (23:23 +0300)]
Staging: adl_pci9118: a language issue fixed

For better use of English, 'mixtured' which is not right, replaced
by 'mixed'.

Signed-off-by: Sam Asadi <asadi.samuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: mite.h: tidy up mite_csigr_wpdep()
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:43 +0000 (10:43 -0700)]
staging: comedi: mite.h: tidy up mite_csigr_wpdep()

Refactor this inline function to fix the checkpatch.pl warnings:

WARNING: Missing a blank line after declarations
WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_tio_internal.c: checkpatch.pl cleanup (break is not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:42 +0000 (10:43 -0700)]
staging: comedi: ni_tio_internal.c: checkpatch.pl cleanup (break is not useful)

Fix the checkpatch.pl warning:

WARNING: break is not useful after a goto or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: das08: checkpatch.pl cleanup (break is not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:41 +0000 (10:43 -0700)]
staging: comedi: das08: checkpatch.pl cleanup (break is not useful)

Fix the checkpatch.pl warning:

WARNING: break is not useful after a goto or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_labpc: checkpatch.pl cleanup (else is not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:40 +0000 (10:43 -0700)]
staging: comedi: ni_labpc: checkpatch.pl cleanup (else is not useful)

Fix the checkpatch.pl warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_tiocmd: checkpatch.pl cleanup (break is not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:39 +0000 (10:43 -0700)]
staging: comedi: ni_tiocmd: checkpatch.pl cleanup (break is not useful)

Fix the checkpatch.pl warning:

WARNING: break is not useful after a goto or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_tio: checkpatch.pl cleanup (else is not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:38 +0000 (10:43 -0700)]
staging: comedi: ni_tio: checkpatch.pl cleanup (else is not useful)

Fix the checkpatch.pl warnings:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_tio: checkpatch.pl cleanup (break is not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:37 +0000 (10:43 -0700)]
staging: comedi: ni_tio: checkpatch.pl cleanup (break is not useful)

Fix the checkpatch.pl warnings:

WARNING: break is not useful after a goto or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: usbduxsigma: checkpatch.pl cleanup (else not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:36 +0000 (10:43 -0700)]
staging: comedi: usbduxsigma: checkpatch.pl cleanup (else not useful)

Fix the checkpatch.pl warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: usbdux: checkpatch.pl cleanup (else not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:35 +0000 (10:43 -0700)]
staging: comedi: usbdux: checkpatch.pl cleanup (else not useful)

Fix the checkpatch.pl warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_common: checkpatch.pl cleanup (else not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:34 +0000 (10:43 -0700)]
staging: comedi: ni_mio_common: checkpatch.pl cleanup (else not useful)

Fix the checkpatch.pl warnings:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_common: checkpatch.pl cleanup (break not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:33 +0000 (10:43 -0700)]
staging: comedi: ni_mio_common: checkpatch.pl cleanup (break not useful)

Fix the checkpatch.pl warning:

WARNING: break is not useful after a goto or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: s626: checkpatch.pl cleanup (else not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:32 +0000 (10:43 -0700)]
staging: comedi: s626: checkpatch.pl cleanup (else not useful)

Fix the checkpatch.pl warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_660x: checkpatch.pl cleanup (else not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:31 +0000 (10:43 -0700)]
staging: comedi: ni_660x: checkpatch.pl cleanup (else not useful)

Fix the checkpatch.pl warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_660x: checkpatch.pl cleanup (break not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:30 +0000 (10:43 -0700)]
staging: comedi: ni_660x: checkpatch.pl cleanup (break not useful)

Fix the checkpatch.pl warnings:

WARNING: break is not useful after a goto or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: cb_pcidas: checkpatch.pl cleanup (break not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:29 +0000 (10:43 -0700)]
staging: comedi: cb_pcidas: checkpatch.pl cleanup (break not useful)

Fix the checkpatch.pl warnings:

WARNING: break is not useful after a goto or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: cb_pcidas64: checkpatch.pl cleanup (break not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:28 +0000 (10:43 -0700)]
staging: comedi: cb_pcidas64: checkpatch.pl cleanup (break not useful)

Fix the checkpatch.pl warnings:

WARNING: break is not useful after a goto or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: s526: checkpatch.pl cleanup (break not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:27 +0000 (10:43 -0700)]
staging: comedi: s526: checkpatch.pl cleanup (break not useful)

Fix the checkpatch.pl warning:

WARNING: break is not useful after a goto or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_at_a2150: checkpatch.pl cleanup (break not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:26 +0000 (10:43 -0700)]
staging: comedi: ni_at_a2150: checkpatch.pl cleanup (break not useful)

Fix the checkpatch.pl warning:

WARNING: break is not useful after a goto or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: das1800: checkpatch.pl cleanup (break not useful)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:25 +0000 (10:43 -0700)]
staging: comedi: das1800: checkpatch.pl cleanup (break not useful)

Fix the checkpatch.pl warnings:

WARNING: break is not useful after a goto or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl724: checkpatch.pl cleanup (else after return)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:24 +0000 (10:43 -0700)]
staging: comedi: pcl724: checkpatch.pl cleanup (else after return)

Fix the checkpatch.pl warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: dt282x: checkpatch.pl cleanup (else after return)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:23 +0000 (10:43 -0700)]
staging: comedi: dt282x: checkpatch.pl cleanup (else after return)

Fix checkpatch.pl warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: daqboard2000: checkpatch.pl cleanup (else after return)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:22 +0000 (10:43 -0700)]
staging: comedi: daqboard2000: checkpatch.pl cleanup (else after return)

Fix these checkpatch.pl warnings:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: cb_pcidas64: checkpatch.pl cleanup (else after return)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:21 +0000 (10:43 -0700)]
staging: comedi: cb_pcidas64: checkpatch.pl cleanup (else after return)

Fix these checkpatch.pl warnings:

WARNING: else is not generally useful after a break or return

Also, remove an unnecessary trailing ';' at the end of a function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pci224: checkpatch.pl cleanup (else after return)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:20 +0000 (10:43 -0700)]
staging: comedi: amplc_pci224: checkpatch.pl cleanup (else after return)

Fix this checkpatch.pl warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pc236: checkpatch.pl cleanup (else after return)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:19 +0000 (10:43 -0700)]
staging: comedi: amplc_pc236: checkpatch.pl cleanup (else after return)

Fix these checkpatch.pl warnings:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_dio200_common: checkpatch.pl cleanup (else after return)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:18 +0000 (10:43 -0700)]
staging: comedi: amplc_dio200_common: checkpatch.pl cleanup (else after return)

Fix these checkpatch.pl warnings:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3xxx: checkpatch.pl cleanup (else after return)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:17 +0000 (10:43 -0700)]
staging: comedi: addi_apci_3xxx: checkpatch.pl cleanup (else after return)

Fix the checkpatch.pl warning in this file:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: 8255: checkpatch.pl cleanup (else after return)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:16 +0000 (10:43 -0700)]
staging: comedi: 8255: checkpatch.pl cleanup (else after return)

Fix the checkpatch.pl warning in this file:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: 8255_pci: checkpatch.pl cleanup (else after return)
H Hartley Sweeten [Wed, 16 Jul 2014 17:43:15 +0000 (10:43 -0700)]
staging: comedi: 8255_pci: checkpatch.pl cleanup (else after return)

Fix the checkpatch.pl warning in this file:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: adl_pci9118: fractured spelling fixed
Sam Asadi [Wed, 16 Jul 2014 15:23:00 +0000 (18:23 +0300)]
Staging: comedi: adl_pci9118: fractured spelling fixed

a fractured spelling in previous style issue fix mended.

Signed-off-by: Sam Asadi <asadi.samuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: adl_pci9118: a style issue fixed
Sam Asadi [Wed, 16 Jul 2014 15:22:59 +0000 (18:22 +0300)]
Staging: comedi: adl_pci9118: a style issue fixed

'quoted string split across lines' warning in checkpatching fixed
by group whole string in one line.

Signed-off-by: Sam Asadi <asadi.samuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: fix missing blank line after variable declaration
Igor Bezukh [Wed, 16 Jul 2014 07:45:30 +0000 (10:45 +0300)]
Staging: vt6655: fix missing blank line after variable declaration

Checkpatch fix - Add missing blank line after variable declaration

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6556: Replace printk by dev_warn
Peter Senna Tschudin [Wed, 16 Jul 2014 16:08:02 +0000 (18:08 +0200)]
staging: vt6556: Replace printk by dev_warn

This patch fixes a checkpatch warning by replacing printk
by dev_warn. Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6556: Remove typedefs
Peter Senna Tschudin [Wed, 16 Jul 2014 16:13:43 +0000 (18:13 +0200)]
staging: vt6556: Remove typedefs

This patch removes uneeded typedefs reported by chackpatch and removes
one enum that is not in use. As checkpatch complained about the typedef
and the enum is not being used, this patch removes both typedef and enum.
The removed enum from card.h:

typedef enum _CARD_PHY_TYPE {
    PHY_TYPE_AUTO = 0,
    PHY_TYPE_11B,
    PHY_TYPE_11G,
    PHY_TYPE_11A
} CARD_PHY_TYPE, *PCARD_PHY_TYPE;

The following typedefs were removed, but enums were kept at device.h:

 typedef enum __device_msg_level
 typedef enum __DEVICE_NDIS_STATUS

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: fix some coding style errors
Vincent Bernat [Wed, 16 Jul 2014 13:19:42 +0000 (15:19 +0200)]
staging: xillybus: fix some coding style errors

This includes:
 - keep "else" on the same line as the closing brace
 - don't use "else" after "return"
 - don't issue a message for an out-of-memory error
 - blank line after a declaration

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_common: tidy up the frequency output subdevice init
H Hartley Sweeten [Mon, 14 Jul 2014 19:24:05 +0000 (12:24 -0700)]
staging: comedi: ni_mio_common: tidy up the frequency output subdevice init

For aesthetics, add some whitespace to the subdevice init.

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: ni_mio_common: tidy up the gpct counter subdevice init
H Hartley Sweeten [Mon, 14 Jul 2014 19:24:04 +0000 (12:24 -0700)]
staging: comedi: ni_mio_common: tidy up the gpct counter subdevice init

For aesthetics, add some whitespace to the subdevice init and
tidy it up a bit.

Unfortunately we can't get rid of the '#ifdef PCIDMA' here yet due
to other ifdefery in this file. For now just add the correct test
so that the async command support is not hooked up unless we have
an IRQ and DMA.

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: ni_mio_common: tidy up the PFI subdevice init
H Hartley Sweeten [Mon, 14 Jul 2014 19:24:03 +0000 (12:24 -0700)]
staging: comedi: ni_mio_common: tidy up the PFI subdevice init

For aesthetics, add some whitespace to the subdevice init and
tidy it up a bit.

Remove the need for the extra local variable.

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: ni_mio_common: tidy up the EEPROM subdevice init
H Hartley Sweeten [Mon, 14 Jul 2014 19:24:02 +0000 (12:24 -0700)]
staging: comedi: ni_mio_common: tidy up the EEPROM subdevice init

For aesthetics, add some whitespace to the subdevice init.

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: ni_mio_common: tidy up the calibration subdevice init
H Hartley Sweeten [Mon, 14 Jul 2014 19:24:01 +0000 (12:24 -0700)]
staging: comedi: ni_mio_common: tidy up the calibration subdevice init

For aesthetics, add some whitespace to the subdevice init.

Refactor the code so that the common parts of the subdevice are initialized
in one place.

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: ni_mio_common: only reset the ai/ao subdevices if they exist
H Hartley Sweeten [Mon, 14 Jul 2014 19:24:00 +0000 (12:24 -0700)]
staging: comedi: ni_mio_common: only reset the ai/ao subdevices if they exist

So of the boards supported by this driver do not have analog inputs and
some don't have analog outputs. Move the calls that reset these subdevices
during the (*attach) by ni_E_init() so they only happen if the subdevices
are present.

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: ni_mio_common: init clock dividers early in ni_E_init()
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:59 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: init clock dividers early in ni_E_init()

The init/reset of the hardware is a bit scattered in this function. For
aesthetics, move the init of the clock dividers so it happens early and
tidy up 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>
10 years agostaging: comedi: ni_mio_common: tidy up the Digital I/O subdevice init
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:58 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: tidy up the Digital I/O subdevice init

For aesthetics, add some whitespace to the Digital I/O subdevice init.

Only hook up the async command support if we have an 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>
10 years agostaging: comedi: ni_mio_common: refactor 'num_p0_dio_channels' boardinfo
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:57 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: refactor 'num_p0_dio_channels' boardinfo

All of the board supported by this driver have at least 8 Digital I/O
channels. A couple of the PCI boards in ni_pcimio have 32 channels.

For aesthetics, change this member of the boardinfo into a bit-field
flag, 'has_32dio_chan', and use that when initializing the DIO subdevice
to set the number of channels to 32 or 8.

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: ni_mio_common: tidy up the Analog Output subdevice init
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:56 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: tidy up the Analog Output subdevice init

For aesthetics, add some whitespace to the Analog Output subdevice init.

Also, remove the '#ifdef PCIDMA' here and only hook up the async command
support if we have an irq and the board either has a fifo or DMA is
supported.

The ni_pcimio driver is the only place PCIDMA is defined. That driver
is also the only user of ni_mio_common that allocates devpriv->mite. Use
that test instead to determine if dma is supported.

Move 'is_67xx' check and init_ao_67xx() call into the Analog Output
subdevice init. The 67xx boards all have analog outputs and this check
does not need to be done for the boards that do not have analog outputs.

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: ni_mio_common: tidy up the Analog Input subdevice init
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:55 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: tidy up the Analog Input subdevice init

For aesthetics, add some whitespace to the Analog Input subdevice init.

The callers of ni_E_init() do the request_irq() and set dev->irq if the
interrupt is available. Only hook up the async command support if we
have the irq.

Also, remove the '#ifdef PCIDMA' here. The ni_pcimio driver is the only
place PCIDMA is defined. That driver is also the only user of ni_mio_common
that allocates devpriv->mite. Use that test instead to determine if the
subdevice async_dma_dir member needs to be initialized.

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: ni_mio_common: (*cancel) only works with async cmd support
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:54 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: (*cancel) only works with async cmd support

The comedi subdevice (*cancel) function can only be called by the core if the
subdevice supports async commands. Move the initialization of this callback
to it is only set if async commands are enabled.

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: ni_stc.h: refactor 'aobits' boardinfo
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:53 +0000 (12:23 -0700)]
staging: comedi: ni_stc.h: refactor 'aobits' boardinfo

For aesthetics, change the 'aobits' in the boardinfo to 'ao_maxdata'
to remove the need for the calculation of the subdevice 'maxdata'.

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: ni_stc.h: refactor 'adbits' boardinfo
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:52 +0000 (12:23 -0700)]
staging: comedi: ni_stc.h: refactor 'adbits' boardinfo

For aesthetics, change the 'adbits' in the boardinfo to 'ai_maxdata'
to remove the need for the calculation of the subdevice 'maxdata'.

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: ni_mio_common: remove unnecessary use of 'board->adbits'
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:51 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: remove unnecessary use of 'board->adbits'

For aesthetics, use the subdevice 'maxdata' instead of the board 'adbits'.

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: ni_mio_common: fix ni_ao_insn_read()
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:50 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: fix ni_ao_insn_read()

The comedi core expects (*insn_read) functions to return insn->n
data smaples. Fix this function to work like the core expects.

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: ni_mio_common: remove ai_continuous from private data
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:49 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: remove ai_continuous from private data

This member of the private data can be determined by checking the
cmd->stop_src. Do that instead and remove the member.

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: ni_mio_common: merge analog output (*insn_write) functions
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:48 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: merge analog output (*insn_write) functions

Currently the PCI6xxx boards use a different (*insn_write) function
for the analog output subdevice. Most of the code is identical to the
(*insn_write) used by all the other board types.

For aesthetics, merge the two (*insn_write) functions and handle the
'is_6xxx' differences in the common 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>
10 years agostaging: comedi: ni_mio_common: remove some unnecessary boardinfo access
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:47 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: remove some unnecessary boardinfo access

Currently ni_m_series_ao_config_chanlist() gets the boardinfo pointer in
order to get the number of analog output channels. Get this from the
comedi_subdevice instead.

The ni_old_ao_config_chanlist() function also gets the boardinfo pointer
to get the analog output resolution, 'aobits', in order to calculate the
value needed to convert samples from unsigned to two's complement for
bipolar ranges. Use the comedi_subdevice 'maxdata' instead.

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: ni_mio_common: remove INSN_CONFIG_ANALOG_TRIG support code
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:46 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: remove INSN_CONFIG_ANALOG_TRIG support code

None of the boardinfo that uses this code sets the 'has_analog_trig' flag so
ni_ai_config_analog_trig() always returns -EINVAL.

Also, the private data 'atrig_low', 'atrig_high', and 'atrig_mode' values
that are set by ni_ai_config_analog_trig() are never used.

Remove the incomplete INSN_CONFIG_ANALOG_TRIG support along with the unused
boardinfo and private data members.

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: ni_mio_common: tidy up ni_ao_munge()
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:45 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: tidy up ni_ao_munge()

Use the bytes_per_sample() helper instead of 'sizeof(short)' to clarify
the length calculation.

Use comedi_offset_munge() to handle the unsigned to two's complement
munge of the data for bipolar ranges.

Tidy up the local variables.

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: ni_stc.h: add some 'is_{board type}' flags to private data
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:44 +0000 (12:23 -0700)]
staging: comedi: ni_stc.h: add some 'is_{board type}' flags to private data

The board->reg_type if checked quite often in the ni_mio_common.c code to
handle differences in the PCI devices supported by the ni_pcimio driver.
Simplify the code a bit by adding some 'is_{board type}' bit-field flags
to the private data.

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: ni_mio_common: fix ni_ao_insn_write()
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:43 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: fix ni_ao_insn_write()

Comedi (*insn_write) functions are expected to write insn->n values
to the hardware. Fix this function to work like the core expects.

Also, don't rely on the return value of ni_ao_comfig_chanlist() to
determine if the values need converted to two's complement before
writing to the hardware. Use the comedi_range_is_bipolar() and
comedi_offset_munge() helpers to clarify 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>
10 years agostaging: comedi: ni_mio_common: remove ao_win_out() macro
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:42 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: remove ao_win_out() macro

This marco relies on a local variable having a specific name. Remove the
macro and just use ni_ao_win_outw() 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>