platform/kernel/linux-rpi.git
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>
10 years agostaging: comedi: ni_mio_common: fix ni_ao_insn_write_671x()
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:41 +0000 (12:23 -0700)]
staging: comedi: ni_mio_common: fix ni_ao_insn_write_671x()

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

Also, use the comedi_offset_munge() helper to convert the comedi unsigned
values into the two's complement values that the hardware needs.

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: remove 'ao_unipolar' flag from ni_board_struct
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:40 +0000 (12:23 -0700)]
staging: comedi: ni_stc.h: remove 'ao_unipolar' flag from ni_board_struct

This member of the boardinfo for the NI MIO drivers is used to indicate if
the ranges for the analog output subdevice (ao_range_table in the boardinfo)
includes any unipolar ranges. If it's not set, the ao_range_table only has
bipolar ranges.

The 'ao_unipolar' flag is checked when munging the ao data values from the
user so that the values for bipolar ranges are converted to 2's complement
values before they are written to the hardware.

The flag is also used when programming the analog output configuration on
non-M series boards for bipolar/unipolar and external reference operation.

Simplify the driver a bit by removing this boardinfo flag and just using
the comedi_range_is_bipolar() and comedi_range_is_external() helpers to
check the range 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: comedidev.h: introduce some 'range_is_external' helpers
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:39 +0000 (12:23 -0700)]
staging: comedi: comedidev.h: introduce some 'range_is_external' helpers

The comedi_krange includes a flags member that currently identifies the
'units' of the range (RF_UNIT) and if the range is from an internal or
external source (RF_EXTERNAL).

Introduce some helper functions to check if a given range is from an
external source.

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: mite.h: tidy up the mite channel register offsets
H Hartley Sweeten [Mon, 14 Jul 2014 19:23:38 +0000 (12:23 -0700)]
staging: comedi: mite.h: tidy up the mite channel register offsets

Convert the inline MITE_* functions, used to calculate the mite channel
register offsets, into simple macros.

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_65xx: factor input filter disable out of (*auto_attach)
H Hartley Sweeten [Mon, 14 Jul 2014 19:07:08 +0000 (12:07 -0700)]
staging: comedi: ni_65xx: factor input filter disable out of (*auto_attach)

For aesthetics, factor the code that disables the input filters out of
ni_65xx_auto_attach().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_65xx: fix digital output reset during attach
H Hartley Sweeten [Mon, 14 Jul 2014 19:07:07 +0000 (12:07 -0700)]
staging: comedi: ni_65xx: fix digital output reset during attach

During the attach of this driver, the digital output ports are all
initialized to a known state. Some of the boards supported by this
driver have output ports that are inverted from the comedi view of
the output state. For these boards the values written to the ports
needs to be inverted.

Currently, only bit 0 of each port is inverted when the boardinfo
indicates that the outputs are inverted. This results in channels
0, 8, 16, etc. being set to '0' and all other channels being set
to '1'. If the boardinfo does not indicate that the outputs are
inverted, all the channels are set to '0'.

This initialization is unnecessary for the input only ports. The
input/output ports also do not need to be initialized since they
are configured as inputs during the attach.

Move the output port initialization so it occurs when the digital
output subdevice is setup. Use the 's->io_bits' value to initialize
the ports so that the correct inverted/non-inverted state is used
for the comedi '0' value.

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_65xx: use the subdevice 'io_bits' to handle the 'invert_outputs'
H Hartley Sweeten [Mon, 14 Jul 2014 19:07:06 +0000 (12:07 -0700)]
staging: comedi: ni_65xx: use the subdevice 'io_bits' to handle the 'invert_outputs'

Some of the boards supported by this driver have output ports that are
inverted from the comedi view of the output state. For these boards the
read values from the output ports needs to be inverted before being
modified and inverted again before being written back in the (*insn_bits)
operation.

Currently the subdevice type and the boardinfo is checked in the (*insn_bits)
to determine if the inverted outputs need to be handled.

Since thise driver does not use the subdevice 'io_bits', simplify the driver
a bit by initializing the 'io_bits' during the attach to handle the inversion.

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_65xx: remove 'output_bits' from private data
H Hartley Sweeten [Mon, 14 Jul 2014 19:07:05 +0000 (12:07 -0700)]
staging: comedi: ni_65xx: remove 'output_bits' from private data

Remove the need for the 'output_bits' in the private data by just
reading the current state of the data port when updating the output
channels in the (*insn_bits) function.

Add a local variable to handle the inverting of the hardware values
when the boardinfo indicates that the outputs are inverted.

Rename the local variable 'port_read_bits' to 'bits' so that we can
use it for updating the output channels and reading back the actual
state to return to the user.

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_65xx: tidy ni_65xx_intr_insn_bits() declaration
H Hartley Sweeten [Mon, 14 Jul 2014 19:07:04 +0000 (12:07 -0700)]
staging: comedi: ni_65xx: tidy ni_65xx_intr_insn_bits() declaration

For aesthetics, tidy up the whitespace of this function declarations to
follow the form in the rest of the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_65xx: update the MODULE_DESCRIPTION
H Hartley Sweeten [Mon, 14 Jul 2014 19:07:03 +0000 (12:07 -0700)]
staging: comedi: ni_65xx: update the MODULE_DESCRIPTION

Update the MODULE_DESCRIPTION to better describe the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_65xx: clean up multi-line comments
H Hartley Sweeten [Mon, 14 Jul 2014 19:07:02 +0000 (12:07 -0700)]
staging: comedi: ni_65xx: clean up multi-line comments

Clean up the multi-line comments at the beginning of the file so they
follow the kernel CodingStyle.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_65xx: tidy up the comedi_driver declaration
H Hartley Sweeten [Mon, 14 Jul 2014 19:07:01 +0000 (12:07 -0700)]
staging: comedi: ni_65xx: tidy up the comedi_driver declaration

For aesthetics, add some whitespace to the comedi_driver declaration.

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_65xx: tidy up the subdevice initialization
H Hartley Sweeten [Mon, 14 Jul 2014 19:07:00 +0000 (12:07 -0700)]
staging: comedi: ni_65xx: tidy up the subdevice initialization

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_65xx: tidy up the port<->chan conversions
H Hartley Sweeten [Mon, 14 Jul 2014 19:06:59 +0000 (12:06 -0700)]
staging: comedi: ni_65xx: tidy up the port<->chan conversions

Introduce some convienence macros to handle the port to channel,
channel to port, and channel mask calculations based on the 8
channels per port of the hardware.

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>