staging: comedi: ni_daq_dio24: remove pcmcia_driver suspend/resume

The pcmcia_driver suspend and resume functions in this driver
don't do anything. Since they are optional just remove them.

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>
staging: comedi: ni_daq_dio24: cleanup pcmcia probe/remove

Absorb the code from dio24_config() into the probe function,
dio24_cs_attach() and properly return the error code when the
probe fails. This also gets rid of an unnecessary forward
declaration.

For aesthetic reasons, move the remove functio, dio24_cs_detach(),
so it's after the probe function.

Remove a number of dev_{level} noise messages in the probe/remove
functions.

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>
staging: comedi: ni_daq_dio24: remove pcmcia_device private data

The private data, struct local_info_t, is not being used in the
driver. Remove it as well as the kzalloc/kfree.

Also, don't set the 'pcmcia_cur_dev' variable unless the pcmcia
probe is successful.

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>
staging: comedi: ni_daq_dio24: move comedi_driver declaration

Move the comedi_driver declaration down in the file. This removes
the need for the forward declarations.

For aesthetic reasons, add some whitespace to the declaration.

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>
staging: comedi: ni_daq_dio24: remove thisboard macro

The 'thisboard' macro relies on a local variable having a specific
name and yields a pointer derived from that local variable.

Replace the macro with a local variable and use the comedi_board()
helper to get the pointer.

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>
staging: comedi: ni_daq_dio24: remove the '#ifdef incomplete' code

All the '#ifdef incomplete' code deals with interrupt support in
this driver. For now just remove all this #if'defed out code.

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>
staging: comedi: ni_daq_dio24: remove comedi private data

The comedi private data, struct dio24_private, is not used in
the driver. Remove it and the kzalloc.

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>
staging: comedi: ni_daq_dio24: remove '#undef LABPC_DEBUG'

The LABPC_DEBUG define is not used in this driver. Just remove the

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>
staging: comedi: ni_daq_dio24: cleanup dio24_detach

Simplify the call to subdev_8255_cleanup() to remove the
need for a local variable.

This driver only attaches to pcmcia devices so the test for
thisboard != pcmcia_bustype will always fail. Remove the test
and the unreachable release_region().

This driver also never does a request_irq() so remove the
free_irq().

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>
staging: comedi: ni_daq_dio24: convert to auto attach

Convert this pcmcia driver to the comedi auto attach mechanism.

This allows getting rid of the "hack" needed to pass the pcmcia_device
pointer from the pcmcia_driver to the comedi_driver as well as the
now unnecessary boardinfo.

Check the call to subdev_8255_init() for success. That function does
a kzalloc and could return -ENOMEM.

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>
staging: comedi: ni_daq_dio24: remove some unnecessary includes

This driver does not use anything from the interrupt.h, slab.h,
and ioport.h headers. Don't bother including them.

For aesthetic reasons, move the include of the comedi specific
8255.h header to the end of the includes.

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>
staging: comedi: ni_labpc_cs: convert to auto attach

Convert this pcmcia driver to the comedi auto attach mechanism.

This allows getting rid of the "hack" needed to pass the pcmcia_device
pointer from the pcmcia_driver to the comedi_driver.

We still need the boardinfo because the ni_labpc driver uses it. But
we can get rid of the duplicate that allowed attaching with the driver
name.

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>
staging: comedi: ni_mio_cs: convert to auto attach

Convert this pcmcia driver to the comedi auto attach mechanism.

This allows getting rid of the "hack" needed to pass the pcmcia_device
pointer from the pcmcia_driver to the comedi_driver.

We still need the boardinfo because ni_mio_common.c uses it. Cleanup
ni_getboardtype() so it returns a pointer to the boardinto instead
of the index.

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>
staging: vt6656: cleared 'do not use C99 // comments' checkpatch errors

switched all // comments on file to respective /**/

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: vt6656: cleared 'do not use C99 // comments' checkpatch errors

Switched // comments into respective /**/ ones

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: vt6656: fixed C99 // comments

Cleared 'do not use C99 // comments' checkpatch errors in two headers.
Several obvious comments were removed.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: vt6656: cleared C99 // comments in datarate.c

Cleared 'do not use C99 // comments' checkpatch error, several warnings
about code indentation and camel casing were not resolved.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: vt6656: fixed C99 // comments in two headers

Cleared 'do not use C99 // comments' checkpatch error in device.h and
device_cfg.h

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: vt6656: fix C99 // comments in main_usb.c

Resolved 'do not use C99 // comments' checkpatch errors.
Many warnings about odd indentation were left.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das08: split out bus specific code

Split the bus specific ISA/PC-104 and PCI code out of this driver
and create two new drivers, das08_isa and das08_pci.

This allows removing all the #ifdef'ery in the das08 driver that
handled if the CONFIG_COMEDI_DAS08_{ISA,PCI} options were enabled.

It also makes the PCI driver cleanly Plug-and-Play since the comedi
driver only has an auto_attach callback. Previously it also had an
attach callback in order to handle the ISA cards.

Since the PCMCIA support was already split out, we can also remove
the now unused enum das08_bustype and it's use in the boardinfo.
The bus specific code deals with the bustype automatically before
it calls the common attach function in das08.

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>