Commit graph

27055 commits

Author SHA1 Message Date
Santiago Torres 89a07bd83a staging:rtl8712:mlme_linux.c: Adds blank lines to pass checkpatch.pl
Added three newlines after variable declarations to pass checkpatch.pl.

Signed-off by: Santiago Torres-Arias <torresariass@gmail.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:05:56 -07:00
Radek Dostal ea7893bb39 staging: lustre: fix sparse warnings "Using plain integer as NULL pointer"
fixes all sparse warnings "Using plain integer as NULL pointer"
in drivers/staging/lustre

drivers/staging/lustre/lnet/lnet/api-ni.c:1665:32: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lnet/lnet/api-ni.c:1773:35: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/fld/fld_request.c:171:17: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/llite/llite_lib.c:155:30: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/llite/lproc_llite.c:846:11: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:902:48: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:946:54: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:2819:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_dev.c:456:66: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/mdc_request.c:2426:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/mdc_request.c:2569:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/mdc_request.c:2740:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:175:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:176:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:177:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:178:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:179:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:180:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:181:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:182:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:183:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:185:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:186:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:193:66: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:194:63: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:195:56: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:196:51: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:197:50: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:198:48: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:199:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:200:11: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:206:48: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:207:11: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mgc/mgc_request.c:199:9: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c:331:11: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/obd_config.c:1164:53: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/obd_config.c:1306:71: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/llog_test.c:943:62: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/llog_test.c:944:65: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdecho/echo_client.c:3116:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/osc/osc_request.c:3424:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/osc/osc_request.c:3548:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/osc/osc_request.c:3615:46: warning: Using plain integer as NULL pointer

Signed-off-by: Radek Dostal <rd@radekdostal.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:03:30 -07:00
Jessica Yu d81f9f5170 Staging: lustre: linux-module: add const modifier to file_operations
Add the const modifier to the file_operations struct, since it is
normally const.

Signed-off-by: Jessica Yu <jyu@cowsay.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:56:42 -07:00
Jessica Yu 18e2e99b8c Staging: lustre: linux-module: remove extraneous parens
Remove unnecessary parens from return statements, return is not a function

Signed-off-by: Jessica Yu <jyu@cowsay.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:56:42 -07:00
Jessica Yu 91a002c752 Staging: lustre: linux-module: remove unnecessary spaces
Remove extraneous space after open paren and before close paren.

Signed-off-by: Jessica Yu <jyu@cowsay.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:56:42 -07:00
Jessica Yu fb574144f0 Staging: lustre: linux-module: fix pointer style issue
Fix pointer code style (foo * bar -> foo *bar)

Signed-off-by: Jessica Yu <jyu@cowsay.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:56:42 -07:00
H Hartley Sweeten 0c3dfdc2d9 staging: comedi: amplc_dio200: use the comedi_device 'mmio' member
The amplc_dio200_common module currently uses a union in the private
data to determine if the hardware uses port or memory mapped I/O.

Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address and remove all the union 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>
2014-07-30 16:55:16 -07:00
H Hartley Sweeten d6e497b92f staging: comedi: ii_pci20kc: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the __iomem * base
address.

Since this was the only member in the private data, remove the struct
and its allocation.

This legacy driver is a bit strange. The base address of the board is
passed to the (*attach) using by the user using the comedi_config
utiltiy. This base address is currently not ioremap'ed and is simply
cast to a void __iomem *. I'm not sure if this is correct. Add a
comment so it will be addressed later.

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>
2014-07-30 16:55:16 -07:00
H Hartley Sweeten 70f7286714 staging: comedi: ni_labpc: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.

Only the ni_labpc_pci module does the ioremap, its also the only
module that sets the 'has_mmio' member in the boardinfo. Remove
this member from the boardinfo and use dev->mmio to determine if
the I/O is memory mapped.

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>
2014-07-30 16:55:16 -07:00
H Hartley Sweeten adcd16a298 staging: comedi: ni_labpc: refactor labpc_8255_mmio()
Refactor the 8255 support code in preperation for using the comedi_device
'mmio' 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>
2014-07-30 16:55:16 -07:00
H Hartley Sweeten 7c555f06fb staging: comedi: ni_labpc: don't pass dev->iobase to labpc_counter_set_mode()
Use the comedi_device parameter that is passed to this function to find
the dev->iobase so it does not have to be included in each call.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:55:16 -07:00
H Hartley Sweeten 3f1ecb9b42 staging: comedi: ni_labpc: don't pass dev->iobase to labpc_counter_load()
Use the comedi_device parameter that is passed to this function to find
the dev->iobase so it does not have to be included in each call.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:55:16 -07:00
H Hartley Sweeten ac482be4b6 staging: comedi: ni_labpc: pass comedi_device to the I/O callbacks
This driver uses some callbacks in the private data to handle the
port mapped or memory mapped I/O used to access the hardware.

Pass the comedi_device pointer to the helper functions so that the
base address can be found and does not need to be included in each
call.

Also, remove the inline from the helper 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>
2014-07-30 16:55:15 -07:00
H Hartley Sweeten 5f8a5f4fa4 staging: comedi: mite: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
'daq_io_addr'.

Move the iounmap of this address from mite_detach() to the drivers
that use the mite module.

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>
2014-07-30 16:55:15 -07:00
H Hartley Sweeten 3bb7c3abe3 staging: comedi: mite: pass comedi_device to mite_setup()
For aesthetics, pass the comedi_device to mite_setup() and mite_setup2()
so that the dev->class_dev can be used in the dev_{level} message to make
the messages have consistancy with the other comedi drivers.

Remove the extra dev_warn() noise in the drivers when mite_setup() fails.

Rename the 'use_iodwbsr_1' parameter and change it to a bool.

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>
2014-07-30 16:55:15 -07:00
H Hartley Sweeten 7a9e24eb4c staging: comedi: mite: inline mite_setup()
This exported function simply calls mite_setup2() with the 'use_iodsbsr_1'
parameter set to 0.

Inline the simple function and remove the EXPORT_SYMBOL_GPL.

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>
2014-07-30 16:55:15 -07:00
H Hartley Sweeten de9cd5ca02 staging: comedi: s626: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.

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>
2014-07-30 16:55:15 -07:00
H Hartley Sweeten c5930d66ac staging: comedi: rtd520: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address of PCI bar 2.

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>
2014-07-30 16:55:15 -07:00
H Hartley Sweeten 9ebd1028cf staging: comedi: cb_pcidas64: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address of PCI bar 3.

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>
2014-07-30 16:55:15 -07:00
H Hartley Sweeten 176db588e2 staging: comedi: ni_670x: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.

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>
2014-07-30 16:55:15 -07:00
H Hartley Sweeten c6f71be317 staging: comedi: ni_6527: iounmap resource when detached
PCI bar 1 is ioremap'ed during the (*auto_attach). This resource
needs to be iounmap'ed when the driver is (*detach)ed.

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>
2014-07-30 16:55:15 -07:00
H Hartley Sweeten 53eeeaa6f7 staging: comedi: ni_6527: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.

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>
2014-07-30 16:55:15 -07:00
H Hartley Sweeten fee3b2455c staging: comedi: dt3000: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.

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>
2014-07-30 16:55:14 -07:00
H Hartley Sweeten 1d14999509 staging: comedi: daqboard2000: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.

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>
2014-07-30 16:55:14 -07:00
H Hartley Sweeten 24a4461279 staging: comedi: addi_apci_3xxx: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.

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>
2014-07-30 16:55:14 -07:00
H Hartley Sweeten a3e6328810 staging: comedi: icp_multi: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.

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>
2014-07-30 16:55:14 -07:00
H Hartley Sweeten 565700447a staging: comedi: mf6x4: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.

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>
2014-07-30 16:55:14 -07:00
H Hartley Sweeten a11f40c83c staging: comedi: me_daq: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.

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>
2014-07-30 16:55:14 -07:00
H Hartley Sweeten c2dcf85a86 staging: comedi: gsc_hpdi: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.

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>
2014-07-30 16:55:14 -07:00
H Hartley Sweeten f7be5ad9a4 staging: comedi: ni_65xx: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.

Since this was the only member in the private data, remove the struct
and its allocation.

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>
2014-07-30 16:55:14 -07:00
H Hartley Sweeten 78b469387d staging: comedi: 8255_pci: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.

Since this was the only member in the private data, remove the struct
and its allocation.

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>
2014-07-30 16:55:14 -07:00
H Hartley Sweeten d7e6dc1338 staging: comedi: add an 'mmio' member to comedi_device
All the comedi drivers that use memory mapped io currently have a
void __iomem * member in their private data for the driver. For
some of the drivers this is actually the only member in that data.

For convienence, add a new member to the comedi_device for this
void __iomem *.

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>
2014-07-30 16:55:14 -07:00
Ian Abbott ab35426810 staging: comedi: amplc_pci230: tidy up stuct pci230_private
Align the member comments a bit better in the declaration of `struct
pci230_private`.  Also remove the heading comment as it is just a
boilerplate comedi comment.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:04 -07:00
Ian Abbott 5565353c36 staging: comedi: amplc_pci230: no need to initialize named members to zero
The members of the elements of `pci230_boards[]` that are not explicitly
named in their initializers will be initialized to 0 automatically, so
there is no need to initialize them to 0 explicitly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:04 -07:00
Ian Abbott bb4bbac2ff staging: comedi: amplc_pci230: add whitespace to pci230_boards[]
Add a bit of whitespace to the initializer of `pci230_boards[]` for
aesthetic reasons.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:04 -07:00
Ian Abbott 2503f6fe89 staging: comedi: amplc_pci230: no need for '&function'
Remove the "address-of" operator when the operand is a function.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:04 -07:00
Ian Abbott 2ba8906f6f staging: comedi: amplc_pci230: remove some indentation in pci230_ai_check_chanlist()
A few lines in `pci230_ai_check_chanlist()` are indented one level too
much, so remove the excess indentation.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:04 -07:00
Ian Abbott a190d26a0d staging: comedi: amplc_pci230: omit '!= 0' from logical expressions
Since anything non-zero is logically "true", don't bother doing
"not-equal" comparisons with zero.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:03 -07:00
Ian Abbott 76cb39e014 staging: comedi: amplc_pci230: don't begin line with binary operator
If an expression involving a binary operator needs to be split across
two lines, put the split after the operator.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:03 -07:00
Ian Abbott 8b39e8e973 staging: comedi: amplc_pci230: add whitespace to register values
Several macros are defined for bit-field values within hardware
registers.  They are defined as left-shifted values.  Add some
whitespace around the left-shift operator.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:03 -07:00
Ian Abbott 5c165423bc staging: comedi: amplc_pci230: remove PCI230_TEST_BIT()
The `PCI230_TEST_BIT()` macro is never used.  Remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:03 -07:00
Ian Abbott e58dbebcc7 staging: comedi: amplc_pci230: remove PCI230_ADC_CONV
The macro `PCI230_ADC_CONV` is never used.  Just remove it.  (At one
time, the value was written to the `PCI230_ADCSWTRIG` register to
trigger a conversion, but any value would do, and the driver no longer
uses that register to trigger conversions anyway.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:03 -07:00
Ian Abbott ad501004d6 staging: comedi: amplc_pci230: remove unused settling time constants
The macro constants `PCI230_DAC_SETTLE`, `PCI230_ADC_SETTLE` and
`PCI230_MUX_SETTLE` are never used.  Just remove them.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:03 -07:00
Ian Abbott e3f59e1c5f staging: comedi: amplc_pci230: usleep_range is preferred over udelay
Fix checkpatch issue: "CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt".  I picked 100 us as a reasonable
upper bound, but it's not that critical.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:03 -07:00
Ian Abbott 9fd8fc3fd0 staging: comedi: amplc_pci230: alignment should match open parenthesis
Fix checkpatch issue: "CHECK: Alignment should match open parenthesis".

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:03 -07:00
Ian Abbott 16de83f53a staging: comedi: amplc_pci230: blank lines aren't necessary before a close brace '}'
Fix checkpatch issues: "CHECK: Blank lines aren't necessary before a
close brace '}'".

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:03 -07:00
Ian Abbott c8e8b7a155 staging: comedi: amplc_pci230: logical continuations should be on the previous line
Fix checkpatch issues "CHECK: Logical continuations should be on the
previous line".

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:02 -07:00
Ian Abbott 1446b44bed staging: comedi: amplc_pci230: fix checkpatch line over 80 characters
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:02 -07:00
Ian Abbott 0af871dbb7 staging: comedi: amplc_pci230: reformat a load of comments
Reformat a load of comments to fit in with the preferred coding style,
including the copyright and driver description comments at the top of
the file.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:54:02 -07:00
H Hartley Sweeten f8cfd0eb3c staging: comedi: ni_tiocmd: introduce ni_tio_acknowledge()
The external callers of ni_tio_acknowledge_and_confirm() only call
this function to ack any pending errors or interrupts before starting
a new async command. Only the internal code in ni_tiocmd uses the
data that is optionally returned by this function.

Remove the export from ni_tio_acknowledge_and_confirm() and introduce
a new exported function that handles passing the NULL params.

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>
2014-07-30 16:51:01 -07:00