]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
10 years agostaging: dgap: remove unneeded dgap_driver_states
Mark Hounschell [Wed, 12 Mar 2014 16:50:53 +0000 (12:50 -0400)]
staging: dgap: remove unneeded dgap_driver_states

The only driver states we need now is READY or !READY.
No need for a sysfs method of seeing those 2 states so
the sysfs entries for dgap_driver_state is also removed.

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: Replace/remove DGAP_SPINLOCK_INIT macro
Mark Hounschell [Tue, 11 Mar 2014 14:11:43 +0000 (10:11 -0400)]
staging: dgap: Replace/remove DGAP_SPINLOCK_INIT macro

This patch gets rid of the DGAP_SPINLOCK_INIT macro

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: Remove unused DGAP_TRYLOCK macro
Mark Hounschell [Tue, 11 Mar 2014 14:08:11 +0000 (10:08 -0400)]
staging: dgap: Remove unused DGAP_TRYLOCK macro

This patch removes  the unused DGAP_TRYLOCK macro

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: Remove unneeded code from dgap.c
Mark Hounschell [Tue, 11 Mar 2014 14:02:19 +0000 (10:02 -0400)]
staging: dgap: Remove unneeded code from dgap.c

This patch removes more unneeded code that was
supporting the old firmware loading process

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: remove some unused defines in dgap.h
Mark Hounschell [Tue, 11 Mar 2014 14:02:18 +0000 (10:02 -0400)]
staging: dgap: remove some unused defines in dgap.h

This patch removes some unused defines in dgap.h

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: fix a few more 80+ char lines (02/02)
Mark Hounschell [Mon, 10 Mar 2014 19:46:55 +0000 (15:46 -0400)]
staging: dgap: fix a few more 80+ char lines (02/02)

This patch fixes a few more 80+ char lines as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: fix a few more 80+ char lines (01/02)
Mark Hounschell [Mon, 10 Mar 2014 19:46:54 +0000 (15:46 -0400)]
staging: dgap: fix a few more 80+ char lines (01/02)

This patch fixes a few more 80+ char lines as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: fix a few 80+ char lines
Mark Hounschell [Mon, 10 Mar 2014 18:39:41 +0000 (14:39 -0400)]
staging: dgap: fix a few 80+ char lines

This patch fixes a few 80+ char lines
as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: [BUG] set usb_fill_int_urb interval to 1
Malcolm Priestley [Mon, 17 Mar 2014 21:15:03 +0000 (21:15 +0000)]
staging: vt6656: [BUG] set usb_fill_int_urb interval to 1

As result of patch
staging: vt6656: [BUG] Fix Warning BOGUS urb xfer, pipe 3 != type 1

has resulted in sluggish TX performance due to interupt inverval
being too long.

Set int_interval to 1 as set in bInterval of endpoint 1.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: lustre: fld: fix split strings.
Gary Rookard [Tue, 11 Mar 2014 03:24:29 +0000 (23:24 -0400)]
Staging: lustre: fld: fix split strings.

unsplit strings from two lines to one. Changes resulted
in line over 80 characters warning. Leaving the latter
of the two warnings for possible string grepping reasons.

Signed-off-by: Gary Alan Rookard <garyrookard@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: lustre: fld: fix spacing issue.
Gary Rookard [Tue, 11 Mar 2014 01:59:09 +0000 (21:59 -0400)]
Staging: lustre: fld: fix spacing issue.

fixed up a spacing issue.

Signed-off-by: Gary Alan Rookard <garyrookard@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: lustre: fld: fix split string.
Gary Rookard [Tue, 11 Mar 2014 01:47:43 +0000 (21:47 -0400)]
Staging: lustre: fld: fix split string.

unsplit string from two lines to one.

Signed-off-by: Gary Alan Rookard <garyrookard@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: lustre: fid: fix split strings.
Gary Rookard [Tue, 11 Mar 2014 01:21:22 +0000 (21:21 -0400)]
Staging: lustre: fid: fix split strings.

unsplit strings from two lines to one.

Signed-off-by: Gary Alan Rookard <garyrookard@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: remove redundant memset() call
Daeseok Youn [Fri, 14 Mar 2014 09:08:43 +0000 (18:08 +0900)]
staging: cxt1e1: remove redundant memset() call

The banner array doens't need to set to 0.
sprintf() adds a terminating '\0'.

And the sn array can be declared and initialized to zero.
So remove redundant memset() with zero.

Remove unnecessary cast for memcpy().

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: remove redundant memset() call
Daeseok Youn [Sun, 9 Mar 2014 23:56:55 +0000 (08:56 +0900)]
staging: cxt1e1: remove redundant memset() call

The name array doens't need to set to 0. Because
sprintf/snprintf adds a terminating '\0'.

And also it doesn't need to assign name array
address to np pointer.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: slicoss: Replace macro with inline defination in slicoss.c
Monam Agarwal [Sun, 9 Mar 2014 13:10:23 +0000 (18:40 +0530)]
Staging: slicoss: Replace macro with inline defination in slicoss.c

This patch moves the macro "SLIC_GET_SLIC_HANDLE(_adapter, _pslic_handle)" to inline
in slicoss.c since it has been used only once.

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: das6402: rewrite broken driver
H Hartley Sweeten [Fri, 14 Mar 2014 19:24:26 +0000 (12:24 -0700)]
staging: comedi: das6402: rewrite broken driver

This driver is _really_ broken.

It initializes an analog input subdevice that only has a (*cancel)
function. It also does a request_irq() to hookup an interrupt handler
using it->options[0] as the IRQ. This option is actually the base
address of the I/O region used by the board. If the interrupt handler
actually did get hooked up, the rest of the code assumes that IRQ 10
is being used.

Rewrite the driver to properly support the hardware.

The DAS6402-12/16 boards have 64 single-ended / 32 differential analog
inputs, 2 analog outputs, 8 digital inputs, and 8 digital outputs. Add
proper support for these subdevices.

Stub in the analog input async command support.

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: rti802: update the MODULE_DESCRIPTION
H Hartley Sweeten [Thu, 13 Mar 2014 22:48:43 +0000 (15:48 -0700)]
staging: comedi: rti802: update the MODULE_DESCRIPTION

Change the generic MODULE_DESCRIPTION text to something more
specific for this 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: rti802: tidy up the multi-line comments
H Hartley Sweeten [Thu, 13 Mar 2014 22:48:42 +0000 (15:48 -0700)]
staging: comedi: rti802: tidy up the multi-line comments

Tidy up the milti-line comments so they follow the 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: rti802: tidy up the register map defines
H Hartley Sweeten [Thu, 13 Mar 2014 22:48:41 +0000 (15:48 -0700)]
staging: comedi: rti802: tidy up the register map defines

For aesthetics, add some whitespace to the register map defines and
convert the offsets to hex.

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: rti802: tidy up the subdevice init
H Hartley Sweeten [Thu, 13 Mar 2014 22:48:40 +0000 (15:48 -0700)]
staging: comedi: rti802: tidy up the 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: rti802: tidy up rti802_ao_insn_write()
H Hartley Sweeten [Thu, 13 Mar 2014 22:48:39 +0000 (15:48 -0700)]
staging: comedi: rti802: tidy up rti802_ao_insn_write()

Use comedi_offset_munge() to handle munging the offset binary to two's
complement.

Tidy up the function 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: rti802: tidy up rti802_ao_insn_read()
H Hartley Sweeten [Thu, 13 Mar 2014 22:48:38 +0000 (15:48 -0700)]
staging: comedi: rti802: tidy up rti802_ao_insn_read()

To clarify the function a bit, add a local variable for the 'chan'
that is being read and change the final return to 'insn->n'.

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: rti802: remove RTI802_SIZE define
H Hartley Sweeten [Thu, 13 Mar 2014 22:48:37 +0000 (15:48 -0700)]
staging: comedi: rti802: remove RTI802_SIZE define

This define is only used in the attach to specify the I/O region size
passed to comedi_request_region(). Remove the define and just open
code the 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: gsc_hpdi: tidy up multi-line comment
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:34 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: tidy up multi-line comment

Tidy up the comment to follow the 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: gsc_hpdi: remove pr_fmt() define
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:33 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: remove pr_fmt() define

This driver no longer has any pr_{level} messages. Remove the pr_fmt().

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: gsc_hpdi: convert comedi_error() messages to dev_err()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:32 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: convert comedi_error() messages to dev_err()

For aesthetics, convert the comedi_error() messages to dev_err().

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: gsc_hpdi: tidy up the boardinfo
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:31 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: tidy up the boardinfo

Remove the unnecessary comments in the boardinfo definition and
tidy up the declaration.

FWIW, I'm not sure this boardinfo is really needed...

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: gsc_hpdi: tidy up the register map
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:30 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: tidy up the register map

For aesthetics, convert the various enums into simple defines to
describe the register map for the board. Group the bit defines with
the associated register define. Convert the helper functions for
the register bit/shift/mask stuff into simple defines.

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: gsc_hpdi: rename 'hpdi_iobase' in private data
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:29 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: rename 'hpdi_iobase' in private data

This member in the private data holds the ioremaped PCI BAR2 address
which is the primary base address for the boards registers.

For aesthetics, rename this member simply 'mmio'.

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: gsc_hpdi: rename 'plx9080_iobase' in private data
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:28 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: rename 'plx9080_iobase' in private data

Rename this member to fix two checkpatch.pl warnings about lines > 80
characters.

Also remove the unnecessary comment.

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: gsc_hpdi: tidy up gsc_hpdi_drain_dma()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:27 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: tidy up gsc_hpdi_drain_dma()

Refactor this function to clarify the loop that reads all the full
buffers.

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: gsc_hpdi: remove 'volatile' from the private data members
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:26 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: remove 'volatile' from the private data members

As reported by checkpatch.pl, the private data members do not need
the volatile tag. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: gsc_hpdi: remove hpdi_writel()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:25 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: remove hpdi_writel()

This helper function is used to OR bits with a software copy of a
register value then writel() the new value to the register. The
software copies are never updated in the driver so they are always
0 due to the kzalloc.

Remove the unnecessary 'bits' from the private data and replace
the hpdi_writel() calls with writel().

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: gsc_hpdi: remove disable_plx_interrupts()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:24 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: remove disable_plx_interrupts()

This helper function is just a simple writel(). Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: gsc_hpdi: rename init_hpdi()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:23 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: rename init_hpdi()

For aesthetics, rename this function so it has namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: gsc_hpdi: rename init_plx9080()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:22 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: rename init_plx9080()

For aesthetics, rename this function so it has namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: gsc_hpdi: rename hpdi_find_board()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:21 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: rename hpdi_find_board()

For aesthetics, rename this function so it has namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: gsc_hpdi: rename the (*auto_attach) and (*detach) functions
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:20 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: rename the (*auto_attach) and (*detach) functions

For aesthetics, rename these functions so they have namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: gsc_hpdi: rename drain_dma_buffers()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:19 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: rename drain_dma_buffers()

For aesthetics, rename this function so it has namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: gsc_hpdi: rename handle_interrupt()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:18 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: rename handle_interrupt()

For aesthetics, rename this function so it has namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: gsc_hpdi: rename abort_dma()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:17 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: rename abort_dma()

For aesthetics, rename this function so it has namespace associated
with the driver.

Also, remove the unnecessary forward 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: gsc_hpdi: rename hpdi_cancel()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:16 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: rename hpdi_cancel()

For aesthetics, rename this function so it has namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: gsc_hpdi: tidy up hpdi_cmd_test()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:15 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: tidy up hpdi_cmd_test()

For aesthetics, rename this function so it has namespace associated
with the driver and move it so that it is not in the middle of the
interrupt support code.

Absorb the di_cmd_test() helper and tidy up the function 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: gsc_hpdi: tidy up hpdi_cmd()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:14 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: tidy up hpdi_cmd()

For aesthetics, rename this function so it has namespace associated
with the driver and move it so that it is not in the middle of the
interrupt support code.

Absorb the di_cmd() helper and tidy up the function 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: gsc_hpdi: tidy up setup_dma_descriptors()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:13 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: tidy up setup_dma_descriptors()

For aesthetics, rename this function so it has namespace associated
with the driver and move it so that it is not in the middle of the
async command support code.

Tidy up the function 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: gsc_hpdi: tidy up dio_config_insn()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:12 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: tidy up dio_config_insn()

For aesthetics, rename this function so it has namespace associated
with the driver and move it so that it is not in the middle of the
async command support code.

Absorb the dio_config_block_size() helper function and remove the
forward 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: gsc_hpdi: move the (*auto_attach) helper functions
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:11 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: move the (*auto_attach) helper functions

For aesthetics, move a couple helper functions that are only called
by the (*auto_attach) closer to that function.

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: gsc_hpdi: absorb setup_subdevices()
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:10 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: absorb setup_subdevices()

This function is only called by the (*auto_attach). Absorb it into that
function to clarify the attach and remove the need for some of the forward
declarations.

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: gsc_hpdi: move the (*auto_attach) and (*detach) functions
H Hartley Sweeten [Thu, 13 Mar 2014 21:16:09 +0000 (14:16 -0700)]
staging: comedi: gsc_hpdi: move the (*auto_attach) and (*detach) functions

Move these functions closer to the comedi_driver declaration. This removes
the need for one of the forward declarations.

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: fl512: tidy up the multi-line comments
H Hartley Sweeten [Thu, 13 Mar 2014 17:10:01 +0000 (10:10 -0700)]
staging: comedi: fl512: tidy up the multi-line comments

Tidy up the multi-line comments to follow the CodingStyle.

Add the GPL boilerplate comment found in other comedi drivers.

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: fl512: tidy up fl512_ao_insn_read()
H Hartley Sweeten [Thu, 13 Mar 2014 17:10:00 +0000 (10:10 -0700)]
staging: comedi: fl512: tidy up fl512_ao_insn_read()

Tidy up this function.

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: fl512: tidy up fl512_ao_insn_write()
H Hartley Sweeten [Thu, 13 Mar 2014 17:09:59 +0000 (10:09 -0700)]
staging: comedi: fl512: tidy up fl512_ao_insn_write()

Tidy up this function. Only save the last value written for readback.

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: fl512: define the register map
H Hartley Sweeten [Thu, 13 Mar 2014 17:09:58 +0000 (10:09 -0700)]
staging: comedi: fl512: define the register map

Define the register map and remove the magic values and some unnecessary
comments.

For aesthetics, remove the 'iobase' local variable and use dev->iobase
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: fl512: tidy up fl512_ao_insn_read()
H Hartley Sweeten [Thu, 13 Mar 2014 17:09:57 +0000 (10:09 -0700)]
staging: comedi: fl512: tidy up fl512_ao_insn_read()

For aesthetics, tidy up this function to match the style used in most
of the comedi drivers for analog output (*insn_read) functions.

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: fl512: remove Fl512_SIZE define
H Hartley Sweeten [Thu, 13 Mar 2014 17:09:56 +0000 (10:09 -0700)]
staging: comedi: fl512: remove Fl512_SIZE define

This define is only used in the comedi_request_region() call to specify
the size of the I/O region to request. Remove the define and just open
code the 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: fl512: rename the subdevice (*insn_{read, write}) functions
H Hartley Sweeten [Thu, 13 Mar 2014 17:09:55 +0000 (10:09 -0700)]
staging: comedi: fl512: rename the subdevice (*insn_{read, write}) functions

For aesthetics, rename these functions and remove the unnecessary comments.

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: fl512: tidy up subdevice init
H Hartley Sweeten [Thu, 13 Mar 2014 17:09:54 +0000 (10:09 -0700)]
staging: comedi: fl512: tidy up subdevice init

Remove the obvious comments and 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: 8255_pci: initialize MITE data window
Ian Abbott [Thu, 13 Mar 2014 15:30:39 +0000 (15:30 +0000)]
staging: comedi: 8255_pci: initialize MITE data window

According to National Instruments' PCI-DIO-96/PXI-6508/PCI-6503 User
Manual, the physical address in PCI BAR1 needs to be OR'ed with 0x80 and
written to register offset 0xC0 in the "MITE" registers (BAR0).  Do so
during initialization of the National Instruments boards handled by the
"8255_pci" driver.  The boards were previously handled by the
"ni_pcidio" driver, where the initialization was done by `mite_setup()`
in the "mite" module.  The "mite" module comes with too much extra
baggage for the "8255_pci" driver to deal with so use a local, simpler
initialization function.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: <stable@vger.kernel.org> # 3.10.y, 3.11.y, 3.12.y, 3.13.y, 3.14.y
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: dac02: introduce comedi driver for DAC02 boards
H Hartley Sweeten [Tue, 11 Mar 2014 19:04:17 +0000 (12:04 -0700)]
staging: comedi: dac02: introduce comedi driver for DAC02 boards

This board is currently supported by the poc driver. That driver used
to support a number of simple boards but now only provides support for
the DAC02 board.

Introduce a new comedi driver specifically for the DAC02 board. This
allows cleaning up all the cruft.

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_daq_dio24: fix a line over 80 characters
Matei Oprea [Tue, 11 Mar 2014 12:39:12 +0000 (14:39 +0200)]
Staging: comedi: ni_daq_dio24: fix a line over 80 characters

Fix a coding style issue.

Signed-off-by: Matei Oprea <eu@opreamatei.ro>
Cc: ROSEdu Kernel Commmunity <firefly@lists.rosedu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: c6xdigio: update the MODULE_DESCRIPTION
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:42 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: update the MODULE_DESCRIPTION

Change the generic MODULE_DESCRIPTION text to something more
specific for this 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: c6xdigio: tidy up the multi-line comments
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:41 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: tidy up the multi-line comments

Reformat the multi-line comments at the beginning of the code to
follow the 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: c6xdigio: add readback of last pwm channel values
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:40 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: add readback of last pwm channel values

Add and (*insn_read) for the PWM subdevice to allow reading back the
last value written to the channels.

There are only 2 PWM channels and they have a maxdata of 500. Pack
the last values in the subdevice 'state' instead of adding a private
data struct to this 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: c6xdigio: use comedi_offset_munge()
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:39 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: use comedi_offset_munge()

The value read from the encoders is in two's complement format. Use
the comedi_offset_munge() helper to convert the value to offset binary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: c6xdigio: consolidate the board_init()
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:38 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: consolidate the board_init()

For aesthetics, rename this function so it has namespace associated
with the driver.

Absorb the c6xdigio_pwm_init() and c6xdigio_encoder_reset() helpers.

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: c6xdigio: tidy up subdevice 1 init
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:37 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: tidy up subdevice 1 init

Remove the commented out init of the 'trig'.

For aesthetics, add some whitespace to the init and rename the 'insn_read'
function.

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: c6xdigio: tidy up subdevice 0 init
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:36 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: tidy up subdevice 0 init

This subdevice is a PWM output not and analog output, fix the 'type'.

Fix the subdevice 'range', range_bipolar does not make sense for a PWM
output. The range_unknown is a better choice.

Remove the commented out init of the 'trig'.

For aesthetics, add some whitespace to the init and rename the 'insn_write'
function.

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: c6xdigio: define the data register bits
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:35 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: define the data register bits

To clarify the code, define the bits in the data register and remove the
magic numbers.

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: c6xdigio: tidy up c6xdigio_pwm_write()
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:34 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: tidy up c6xdigio_pwm_write()

The 10-bit pwm value (2-498) is written by banging 2-bits in the data register.

Refactor this function to remove the need for the union pcmcmdtype and struct
pwmbitstype.

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: c6xdigio: introduce c6xdigio_get_encoder_bits()
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:33 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: introduce c6xdigio_get_encoder_bits()

The 24-bit encoder value is read using 3-bits in the status register. The
data register is banged between each read of the status register to advance
the bits.

Introduce a helper function to handle this and remove the union encvaluetype
and struct encbitsbyte.

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: c6xdigio: define the register map
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:32 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: define the register map

The register map was already defined but it was not being used. Rename
to defines and use them in 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: c6xdigio: introduce c6xdigio_write_data()
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:31 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: introduce c6xdigio_write_data()

All writes to the hardware involve writing the the data register then
checking the status register. Introduce a helper function to handle this.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: c6xdigio: change first param to c6xdigio_chk_status()
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:30 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: change first param to c6xdigio_chk_status()

For aesthetics, pass the comedi_device pointer instead of the dev->iobase
as the first parameter.

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: c6xdigio: tidy up C6X_encInput()
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:29 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: tidy up C6X_encInput()

Rename the CamelCase function.

For aesthetics, pass the comedi_device pointer instead of the dev->iobase
as the first parameter.

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: c6xdigio: tidy up C6X_pwmOutput()
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:28 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: tidy up C6X_pwmOutput()

Rename the CamelCase function.

For aesthetics, pass the comedi_device pointer instead of the dev->iobase
as the first parameter.

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: c6xdigio: tidy up C6X_encResetAll()
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:27 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: tidy up C6X_encResetAll()

Rename the CamelCase function.

For aesthetics, pass the comedi_device pointer instead of the dev->iobase.

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: c6xdigio: tidy up C6X_pwmInit()
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:26 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: tidy up C6X_pwmInit()

Rename the CamelCase function.

For aesthetics, pass the comedi_device pointer instead of the dev->iobase.

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: c6xdigio: factor out status check busywait
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:25 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: factor out status check busywait

Factor out the common code that busywaits for the status to change.

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: c6xdigio: remove C6XDIGIO_SIZE
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:24 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: remove C6XDIGIO_SIZE

This define is only used in the comedi_request_region() call and does
not add any additional clarity to the code. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: c6xdigio: remove WriteByteToHwPort()
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:23 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: remove WriteByteToHwPort()

This CamelCase function is just a wrapper around outb_p(). Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: c6xdigio: remove ReadByteFromHwPort()
H Hartley Sweeten [Mon, 10 Mar 2014 21:07:22 +0000 (14:07 -0700)]
staging: comedi: c6xdigio: remove ReadByteFromHwPort()

This CamelCase function is just a wrapper around inb(). Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: Comedi: addi-data: Clean up function comments
Fred Akers [Tue, 11 Mar 2014 22:19:13 +0000 (18:19 -0400)]
Staging: Comedi: addi-data: Clean up function comments

These comments look terrible and are full of redundant information.
Also reformat the license at the head of the file to wrap at 80 char.

Signed-off-by: Fred Akers <knivey@botops.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: addi-data: Fix long CamelCase function names
Fred Akers [Tue, 11 Mar 2014 22:19:12 +0000 (18:19 -0400)]
Staging: comedi: addi-data: Fix long CamelCase function names

This patch fixes a few function names that are very long and are
not in the correct naming style

Signed-off-by: Fred Akers <knivey@botops.net>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: addi-data: style cleanups in hwdrv_apci1564.c
Chase Southwood [Sun, 9 Mar 2014 06:42:47 +0000 (00:42 -0600)]
Staging: comedi: addi-data: style cleanups in hwdrv_apci1564.c

This patch cleans up a few trivial style issues, including fixing crazy
indentation problems in the defines near the top of the file, removing a
couple of unneeded braces, and wrapping a couple of long comments onto new
lines to fix lines which were in excess of 80 characters.

Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: propagate timeout errors in s626.c
Chase Southwood [Sat, 8 Mar 2014 01:43:17 +0000 (19:43 -0600)]
Staging: comedi: propagate timeout errors in s626.c

This patch for s626.c propagates the errors from the newly introduced
calls to comedi_timeout() as far as possible.

Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: convert while loops to timeouts in s626.c
Chase Southwood [Sun, 9 Mar 2014 04:00:54 +0000 (22:00 -0600)]
Staging: comedi: convert while loops to timeouts in s626.c

This patch changes a handful of while loops to timeouts to prevent
infinite looping on hardware failure. A couple such loops are in a
function (s626_debi_transfer()) which is called from critical sections,
so comedi_timeout() is unusable for them, and an iterative timeout is
used instead. For the while loops in a context where comedi_timeout() is
allowed, a new callback function, s626_send_dac_eoc(), has been defined
to evaluate the conditions that the while loops are testing.  The new
callback employs a switch statement based on a simple new enum so that
it is usable for all of the different conditions tested in while loops
in s626_send_dac().  The proper comedi_timeout() calls are then used.

Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: drivers should not clear the async->events
H Hartley Sweeten [Sat, 8 Mar 2014 00:31:46 +0000 (17:31 -0700)]
staging: comedi: drivers should not clear the async->events

The comedi core resets the async->events in comedi_buf_reset() which is
called when the subdevice is restored to an idle state and at the start
of an async command. The async->events are also cleared after handling
the events in comedi_event().

Drivers should not clear the events manually.

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: quatech_daqp_cs: use cfc_handle_events()
H Hartley Sweeten [Sat, 8 Mar 2014 00:31:45 +0000 (17:31 -0700)]
staging: comedi: quatech_daqp_cs: use cfc_handle_events()

Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_QUATECH_DAQP_CS selects COMEDI_FC.

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_pcidio: use cfc_handle_events()
H Hartley Sweeten [Sat, 8 Mar 2014 00:31:44 +0000 (17:31 -0700)]
staging: comedi: ni_pcidio: use cfc_handle_events()

Use the comedi_fc helper function instead of duplicating the code.

In the Kconfig, COMEDI_NI_PCIDIO selects COMEDI_FC indirectly by
selecting COMEDI_MITE which selects COMEDI_FC.

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_labpc: use cfc_handle_events()
H Hartley Sweeten [Sat, 8 Mar 2014 00:31:43 +0000 (17:31 -0700)]
staging: comedi: ni_labpc: use cfc_handle_events()

Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Also, remove the clearing of the events, comedi_event() does that.

In the Kconfig, COMEDI_NI_LABPC already selects COMEDI_FC.

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: dt3000: use cfc_handle_events()
H Hartley Sweeten [Sat, 8 Mar 2014 00:31:42 +0000 (17:31 -0700)]
staging: comedi: dt3000: use cfc_handle_events()

Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_DT3000 selects COMEDI_FC.

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_660x: use cfc_handle_events()
H Hartley Sweeten [Sat, 8 Mar 2014 00:31:41 +0000 (17:31 -0700)]
staging: comedi: ni_660x: use cfc_handle_events()

Use the comedi_fc helper function instead of duplicating the code.

In the Kconfig, COMEDI_NI_660X selects COMEDI_FC indirectly by selecting
COMEDI_NI_TIOCMD which selects COMEDI_MITE which selects COMEDI_FC.

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: pcl818: use cfc_handle_events()
H Hartley Sweeten [Sat, 8 Mar 2014 00:31:40 +0000 (17:31 -0700)]
staging: comedi: pcl818: use cfc_handle_events()

Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_PCL818 selects COMEDI_FC.

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: pcl816: use cfc_handle_events()
H Hartley Sweeten [Sat, 8 Mar 2014 00:31:39 +0000 (17:31 -0700)]
staging: comedi: pcl816: use cfc_handle_events()

Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_PCL816 selects COMEDI_FC.

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: pcl812: use cfc_handle_events()
H Hartley Sweeten [Sat, 8 Mar 2014 00:31:38 +0000 (17:31 -0700)]
staging: comedi: pcl812: use cfc_handle_events()

Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_PCL812 selects COMEDI_FC.

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: cb_pcidas: use cfc_handle_events()
H Hartley Sweeten [Sat, 8 Mar 2014 00:31:37 +0000 (17:31 -0700)]
staging: comedi: cb_pcidas: use cfc_handle_events()

Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Also, remove the clearing of the events, comedi_event() does that.

In the Kconfig, COMEDI_CB_PCIDAS already selects COMEDI_FC.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pci224: use cfc_handle_events()
H Hartley Sweeten [Sat, 8 Mar 2014 00:31:36 +0000 (17:31 -0700)]
staging: comedi: amplc_pci224: use cfc_handle_events()

Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

In the Kconfig, COMEDI_AMPLC_PCI224 already selects COMEDI_FC.

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: use cfc_handle_events()
H Hartley Sweeten [Sat, 8 Mar 2014 00:31:35 +0000 (17:31 -0700)]
staging: comedi: ni_mio_common: use cfc_handle_events()

The ni_event() function in this file is an open coded version of
cfc_handle_events() where instead of calling the subdevice (*cancel)
function a switch is used to call the function based on the subdevice
'index'.

Use the comedi_fc helper function to simplify the code.

This also allows removing a couple of the forward declarations.

Fix the #ifdef/#endif for the ni_gpct_cancel() foward declaration and
around the function. This function is now only referenced by code that
is blocked with #ifdef PCIDMA.

This source file is included by the ni_atmio, ni_mio_cs, and ni_pcimio
drivers. In the Kconfig, the config options for these drivers already
select COMEDI_FC.

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_at_a2150: use cfc_handle_events()
H Hartley Sweeten [Sat, 8 Mar 2014 00:31:34 +0000 (17:31 -0700)]
staging: comedi: ni_at_a2150: use cfc_handle_events()

Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Also, remove the clearing of the events, comedi_event() does that.

In the Kconfig, COMEDI_NI_AT_A2150 already selects COMEDI_FC.

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>