]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agostaging: comedi: addi-data: remove duplicate ADDIDATA_{ENABLE,DISABLE} defines
H Hartley Sweeten [Wed, 31 Oct 2012 23:59:15 +0000 (16:59 -0700)]
staging: comedi: addi-data: remove duplicate ADDIDATA_{ENABLE,DISABLE} defines

These are defined in addi_common.h, the hwdrv_* files do not need
to redefined 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>
11 years agostaging: comedi: addi-data: remove duplicate #include's
H Hartley Sweeten [Wed, 31 Oct 2012 23:58:56 +0000 (16:58 -0700)]
staging: comedi: addi-data: remove duplicate #include's

All these #include's have already been handled.

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>
11 years agostaging: comedi: addi-data: remove addi_amcc_s5933.h
H Hartley Sweeten [Wed, 31 Oct 2012 23:58:40 +0000 (16:58 -0700)]
staging: comedi: addi-data: remove addi_amcc_s5933.h

Now that the PCI bus walking has been removed from the addi-data
drivers, the only differenced between addi_amcc_s9533.h and the
standard comedi amcc_s5933.h is the additional defines for the
apci3120 "ADDON RELATED ADDITIONS". Move those defines to
hwdrv_apci3120.c.

Modify all the addi-data drivers to then include the standard
comedi amcc_s5933.h header and delete the duplicate in addi-data.

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>
11 years agostaging: comedi: addi-data: remove 'b_ValidDriver' from the private data
H Hartley Sweeten [Wed, 31 Oct 2012 23:58:25 +0000 (16:58 -0700)]
staging: comedi: addi-data: remove 'b_ValidDriver' from the private data

This variable is only used in the detach of the addi-data boards to
indicate that the attach of the board was successful and that the reset
function can be called. We can use the dev->iobase variable to indicate
this instead. Once this variable is set the attach always completes.

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>
11 years agostaging: comedi: addi-data: remove 'allocated' from the private data
H Hartley Sweeten [Wed, 31 Oct 2012 23:58:09 +0000 (16:58 -0700)]
staging: comedi: addi-data: remove 'allocated' from the private data

This variable is only used as a flag to indicate that the pci device
has been enabled. Use the comedi_device 'iobase' variable to indicate
this instead. This is how it's normally handled in the comedi pci
drivers.

Make the call to comedi_pci_disabled() in i_ADDI_Detach() common
and move it to the end of the function. Both the if and else case
require it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi-data: cleanup reading of the PCI bars
H Hartley Sweeten [Wed, 31 Oct 2012 23:57:52 +0000 (16:57 -0700)]
staging: comedi: addi-data: cleanup reading of the PCI bars

Read the PCI bars directly into the private data variables and
remove all the local variables used for them in addi_attach_pci().

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>
11 years agostaging: comedi: addi-data: use attach_pci callback
H Hartley Sweeten [Wed, 31 Oct 2012 23:57:37 +0000 (16:57 -0700)]
staging: comedi: addi-data: use attach_pci callback

Use the comedi pci auto config mechanism to attach the addi-data
drivers. This allows removing all the PCI bus walking code.

Add a function, addi_find_boardinfo(), to find the driver specific
boardinfo. Since this function is currently in the common code we
have to use the pointer to the boardinfo that is stored in the
comedi_driver 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>
11 years agostaging: comedi: addi-data: remove i_pci_card_free()
H Hartley Sweeten [Wed, 31 Oct 2012 23:57:22 +0000 (16:57 -0700)]
staging: comedi: addi-data: remove i_pci_card_free()

This function calls comedi_pci_disable() to disable the pci
device when detached. It's only called from i_ADDI_Detach().
Move the code there and delete the 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>
11 years agostaging: comedi: addi-data: remove attach option to disable dma
H Hartley Sweeten [Wed, 31 Oct 2012 23:57:07 +0000 (16:57 -0700)]
staging: comedi: addi-data: remove attach option to disable dma

This pci driver currently uses the comedi legacy attach mechanism
which allows the user to pass configuration options to the driver
when it is attached to the comedi subsystem. The use of these
configuration options is preventing the conversion of the addi-data
drivers to the comedi auto attach mechanism.

For the addi-data drivers, option[2] is used to enable/disable dma.
The default (0) action is to enable dma is the driver supports it.

Remove this configuration option and just enable dma if it is
supported.

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>
11 years agostaging: comedi: addi-data: remove 'irq' from the card data
H Hartley Sweeten [Wed, 31 Oct 2012 23:56:42 +0000 (16:56 -0700)]
staging: comedi: addi-data: remove 'irq' from the card data

This information can be found when needed in i_ADDI_Attach() by
using the pci_dev 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>
11 years agostaging: comedi: addi-data: add a 'pcidev' local var to i_ADDI_Attach()
H Hartley Sweeten [Wed, 31 Oct 2012 23:56:27 +0000 (16:56 -0700)]
staging: comedi: addi-data: add a 'pcidev' local var to i_ADDI_Attach()

Add a local variable for the pci_dev pointer to make the code a
bit cleaner.

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>
11 years agostaging: comedi: addi-data: absorb pci_card_alloc() into i_ADDI_Attach()
H Hartley Sweeten [Wed, 31 Oct 2012 23:56:11 +0000 (16:56 -0700)]
staging: comedi: addi-data: absorb pci_card_alloc() into i_ADDI_Attach()

The function pci_card_alloc() enables the pci device by calling
comedi_pci_enable() and then optionally calls pci_set_master() to
enable bus mastering for DMA.

Absorb this code directly into i_ADDI_Attach() as is more typical
for comedi PCI drivers. Also, remove the now unused i_Master
parameter from ptr_select_and_alloc_pci_card().

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>
11 years agostaging: comedi: addi-data: remove io_addr array from card data
H Hartley Sweeten [Wed, 31 Oct 2012 23:55:54 +0000 (16:55 -0700)]
staging: comedi: addi-data: remove io_addr array from card data

The io_addr array in the card data holds the PCI bar base addresses
returned by pci_resource_start(). Remove this array and just use
pci_resource_start() where needed in i_ADDI_Attach().

This also allows getting rid of i_pci_card_data() since it now
does nothing.

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>
11 years agostaging: comedi: addi-data: remove irq parameter from i_pci_card_data()
H Hartley Sweeten [Wed, 31 Oct 2012 23:55:37 +0000 (16:55 -0700)]
staging: comedi: addi-data: remove irq parameter from i_pci_card_data()

The irq parameter passed to i_pci_card_data() is used to get the pci_dev
irq that is cached in the card data. This information can easily be found
when needed in i_ADDI_Attach() from the 'card' pointer to the card data.

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>
11 years agostaging: comedi: addi-data: remove unused parameters from i_pci_card_data()
H Hartley Sweeten [Wed, 31 Oct 2012 23:55:21 +0000 (16:55 -0700)]
staging: comedi: addi-data: remove unused parameters from i_pci_card_data()

The pci_bus, pci_slot, and pci_func data returned by i_pci_card_data()
are not used. Remove them from the parameters to the function and also
remove the local variables in i_ADDI_Attach() that held the returned
data.

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>
11 years agostaging: comedi: addi-data: remove the board attach noise
H Hartley Sweeten [Wed, 31 Oct 2012 23:55:00 +0000 (16:55 -0700)]
staging: comedi: addi-data: remove the board attach noise

Remove all the kernel messages from i_ADDI_Attach(). These are just
additional boot noise.

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>
11 years agostaging: comedi: addi-data: remove v_pci_card_list_display()
H Hartley Sweeten [Wed, 31 Oct 2012 23:54:43 +0000 (16:54 -0700)]
staging: comedi: addi-data: remove v_pci_card_list_display()

This function dumps a list of all the add-data PCI cards found. This
information is just noise. Remove the function.

Also, remove the parameter from v_pci_card_list_init() that caused
this information to be dumped.

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>
11 years agostaging: comedi: addi_apci_*: add module_comedi_pci_driver()
H Hartley Sweeten [Wed, 31 Oct 2012 01:06:33 +0000 (18:06 -0700)]
staging: comedi: addi_apci_*: add module_comedi_pci_driver()

Pull the module init code out of addi_common.c and add it to
each addi-data driver. Rename the data and functions so they
have namespace associated with the drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_*: remove unneeded CONFIG_APCI_* defines
H Hartley Sweeten [Wed, 31 Oct 2012 01:06:13 +0000 (18:06 -0700)]
staging: comedi: addi_apci_*: remove unneeded CONFIG_APCI_* defines

These defines were needed for the #ifdef'ery that used to exist
in addi_common.c. Since that has been removed these are no longer
used.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwdrv_APCI1710: absorb private header
H Hartley Sweeten [Wed, 31 Oct 2012 00:04:45 +0000 (17:04 -0700)]
staging: comedi: hwdrv_APCI1710: absorb private header

The header file hwdrv_APCi1710.h is only included by the source
file hwdrv_APCI1710.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwdrv_apci3200: absorb private header
H Hartley Sweeten [Wed, 31 Oct 2012 00:04:30 +0000 (17:04 -0700)]
staging: comedi: hwdrv_apci3200: absorb private header

The header file hwdrv_apci3200.h is only included by the source
file hwdrv_apci3200.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwdrv_apci3200: remove forward declarations
H Hartley Sweeten [Wed, 31 Oct 2012 00:04:12 +0000 (17:04 -0700)]
staging: comedi: hwdrv_apci3200: remove forward declarations

This source file is #include'd when building the addi_apci_3200 and
addi_apci_3300 driver. All the functions in this file are actually
static and should not be exported to the kernel.

Move some of the functions to remove the need for the forward declarations
and make all of the functions in this file static. Note, this patch does
not try to fix any of the coding style issues in the functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: APCI1710_Pwm: absorb private header
H Hartley Sweeten [Wed, 31 Oct 2012 00:03:25 +0000 (17:03 -0700)]
staging: comedi: APCI1710_Pwm: absorb private header

The header file APCI1710_Pwm.h is only included by the source
file APCI1710_Pwm.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: APCI1710_Pwm: remove forward declarations
H Hartley Sweeten [Wed, 31 Oct 2012 00:03:11 +0000 (17:03 -0700)]
staging: comedi: APCI1710_Pwm: remove forward declarations

This source file is #include'd when building the addi_apci_1710 driver.
All the functions in this file are actually static and should not be
exported to the kernel.

Move some of the functions to remove the need for the forward declarations
and make all of the functions in this file static. Note, this patch does
not try to fix any of the coding style issues in the functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: APCI1710_INCCPT: absorb private header
H Hartley Sweeten [Wed, 31 Oct 2012 00:02:55 +0000 (17:02 -0700)]
staging: comedi: APCI1710_INCCPT: absorb private header

The header file APCI1710_INCCPT.h is only included by the source
file APCI1710_INCCPT.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: APCI1710_INCCPT: remove forward declarations
H Hartley Sweeten [Wed, 31 Oct 2012 00:02:37 +0000 (17:02 -0700)]
staging: comedi: APCI1710_INCCPT: remove forward declarations

This source file is #include'd when building the addi_apci_1710 driver.
All the functions in this file are actually static and should not be
exported to the kernel.

Move some of the functions to remove the need for the forward declarations
and make all of the functions in this file static. Note, this patch does
not try to fix any of the coding style issues in the functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: APCI1710_Chrono: absorb private header
H Hartley Sweeten [Wed, 31 Oct 2012 00:02:05 +0000 (17:02 -0700)]
staging: comedi: APCI1710_Chrono: absorb private header

The header file APCI1710_Chrono.h is only included by the source
file APCI1710_Chrono.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: APCI1710_Chrono: remove forward declarations
H Hartley Sweeten [Wed, 31 Oct 2012 00:01:46 +0000 (17:01 -0700)]
staging: comedi: APCI1710_Chrono: remove forward declarations

This source file is #include'd when building the addi_apci_1710 driver.
All the functions in this file are actually static and should not be
exported to the kernel.

Move some of the functions to remove the need for the forward declarations
and make all of the functions in this file static. Note, this patch does
not try to fix any of the coding style issues in the functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: APCI1710_82x54: absorb private header
H Hartley Sweeten [Wed, 31 Oct 2012 00:01:28 +0000 (17:01 -0700)]
staging: comedi: APCI1710_82x54: absorb private header

The header file APCI1710_82x54.h is only included by the source
file APCI1710_82x54.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: APCI1710_82x54: remove forward declarations
H Hartley Sweeten [Wed, 31 Oct 2012 00:01:13 +0000 (17:01 -0700)]
staging: comedi: APCI1710_82x54: remove forward declarations

This source file is #include'd when building the addi_apci_1710 driver.
All the functions in this file are actually static and should not be
exported to the kernel.

Move some of the functions to remove the need for the forward declarations
and make all of the functions in this file static. Note, this patch does
not try to fix any of the coding style issues in the functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: APCI1710_Dig_io: absorb private header
H Hartley Sweeten [Wed, 31 Oct 2012 00:00:54 +0000 (17:00 -0700)]
staging: comedi: APCI1710_Dig_io: absorb private header

The header file APCI1710_Dig_io.h is only included by the source
file APCI1710_Dig_io.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: APCI1710_Inp_cpt: absorb private header
H Hartley Sweeten [Wed, 31 Oct 2012 00:00:38 +0000 (17:00 -0700)]
staging: comedi: APCI1710_Inp_cpt: absorb private header

The header file APCI1710_Inp_cpt.h is only included by the source
file APCI1710_Inp_cpt.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: APCI1710_Ssi: absorb private header
H Hartley Sweeten [Wed, 31 Oct 2012 00:00:21 +0000 (17:00 -0700)]
staging: comedi: APCI1710_Ssi: absorb private header

The header file APCI1710_Ssi.h is only included by the source
file APCI1710_Ssi.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: APCI1710_Tor: absorb private header
H Hartley Sweeten [Wed, 31 Oct 2012 00:00:07 +0000 (17:00 -0700)]
staging: comedi: APCI1710_Tor: absorb private header

The header file APCI1710_Tor.h is only included by the source
file APCI1710_Tor.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: APCI1710_Ttl: absorb private header
H Hartley Sweeten [Tue, 30 Oct 2012 23:59:49 +0000 (16:59 -0700)]
staging: comedi: APCI1710_Ttl: absorb private header

The header file APCI1710_Ttl.h is only included by the source
file APCI1710_Ttl.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwrdv_apci3120: absorb private header
H Hartley Sweeten [Tue, 30 Oct 2012 23:59:35 +0000 (16:59 -0700)]
staging: comedi: hwrdv_apci3120: absorb private header

The header file hwdrv_apci3120.h is only included by the source
file hwrdv_apci3120.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwdrv_apci3120: remove forward declarations
H Hartley Sweeten [Tue, 30 Oct 2012 23:59:19 +0000 (16:59 -0700)]
staging: comedi: hwdrv_apci3120: remove forward declarations

This source file is #include'd when building the addi_apci_3001 and
addi_apci_3120 drivers. All the functions in this file are actually
static and should not be exported to the kernel.

Move some of the functions to remove the need for the forward declarations
and make all of the functions in this file static. Note, this patch does
not try to fix any of the coding style issues in the functions.

Also, remove most of the big comment blocks preceding each function.
Leave the 'task' information for some of them to assist in later cleanup.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwrdv_apci3xxx: absorb private header
H Hartley Sweeten [Tue, 30 Oct 2012 23:58:14 +0000 (16:58 -0700)]
staging: comedi: hwrdv_apci3xxx: absorb private header

The header file hwdrv_apci3xxx.h is only included by the source
file hwrdv_apci3xxx.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwrdv_apci3501: absorb private header
H Hartley Sweeten [Tue, 30 Oct 2012 23:57:59 +0000 (16:57 -0700)]
staging: comedi: hwrdv_apci3501: absorb private header

The header file hwdrv_apci3501.h is only included by the source
file hwrdv_apci3501.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwrdv_apci2200: absorb private header
H Hartley Sweeten [Tue, 30 Oct 2012 23:57:44 +0000 (16:57 -0700)]
staging: comedi: hwrdv_apci2200: absorb private header

The header file hwdrv_apci2200.h is only included by the source
file hwrdv_apci2200.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwrdv_apci2032: absorb private header
H Hartley Sweeten [Tue, 30 Oct 2012 23:57:29 +0000 (16:57 -0700)]
staging: comedi: hwrdv_apci2032: absorb private header

The header file hwdrv_apci2032.h is only included by the source
file hwrdv_apci2032.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwrdv_apci2016: absorb private header
H Hartley Sweeten [Tue, 30 Oct 2012 23:57:13 +0000 (16:57 -0700)]
staging: comedi: hwrdv_apci2016: absorb private header

The header file hwdrv_apci2016.h is only included by the source
file hwrdv_apci2016.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwrdv_apci16xx: absorb private header
H Hartley Sweeten [Tue, 30 Oct 2012 23:56:59 +0000 (16:56 -0700)]
staging: comedi: hwrdv_apci16xx: absorb private header

The header file hwdrv_apci16xx.h is only included by the source
file hwrdv_apci16xx.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwrdv_apci1564: absorb private header
H Hartley Sweeten [Tue, 30 Oct 2012 23:56:38 +0000 (16:56 -0700)]
staging: comedi: hwrdv_apci1564: absorb private header

The header file hwdrv_apci1564.h is only included by the source
file hwrdv_apci1564.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwrdv_apci1516: absorb private header
H Hartley Sweeten [Tue, 30 Oct 2012 23:56:19 +0000 (16:56 -0700)]
staging: comedi: hwrdv_apci1516: absorb private header

The header file hwdrv_apci1516.h is only included by the source
file hwrdv_apci1516.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwrdv_apci1500: absorb private header
H Hartley Sweeten [Tue, 30 Oct 2012 23:56:02 +0000 (16:56 -0700)]
staging: comedi: hwrdv_apci1500: absorb private header

The header file hwdrv_apci1500.h is only included by the source
file hwrdv_apci1500.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwrdv_apci1032: absorb private header
H Hartley Sweeten [Tue, 30 Oct 2012 23:55:45 +0000 (16:55 -0700)]
staging: comedi: hwrdv_apci1032: absorb private header

The header file hwdrv_apci1032.h is only included by the source
file hwrdv_apci1032.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwrdv_apci035: absorb private header
H Hartley Sweeten [Tue, 30 Oct 2012 23:55:22 +0000 (16:55 -0700)]
staging: comedi: hwrdv_apci035: absorb private header

The header file hwdrv_apci035.h is only included by the source
file hwrdv_apci035.c. Absorb the header into the source and
delete the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: rtl8192e: rtllib_tx.c: fixed an asterisk coding style issue
Edgar Neukirchner [Wed, 31 Oct 2012 14:48:58 +0000 (15:48 +0100)]
Staging: rtl8192e: rtllib_tx.c: fixed an asterisk coding style issue

Fixed coding style issue

Signed-off-by: Edgar Neukirchner <edgar.neukirchner@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ozwpan: use tasklet_kill in device remove/release process
Xiaotian Feng [Wed, 31 Oct 2012 10:56:48 +0000 (18:56 +0800)]
staging: ozwpan: use tasklet_kill in device remove/release process

Some driver uses tasklet_disable in device remove/release process,
tasklet_disable will inc tasklet->count and return. If the tasklet
is not handled yet under some softirq pressure, the tasklet will be
placed on the tasklet_vec, never have a chance to be excuted. This might
lead to a heavy loaded ksoftirqd, wakeup with pending_softirq, but
tasklet is disabled. tasklet_kill should be used in this case.

Signed-off-by: Xiaotian Feng <dannyfeng@tencent.com>
Cc: Rupesh Gujare <rgujare@ozmodevices.com>
Cc: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: rtd520: use auto_attach instead of attach_pci
Ian Abbott [Wed, 31 Oct 2012 11:56:23 +0000 (11:56 +0000)]
staging: comedi: rtd520: use auto_attach instead of attach_pci

Change the rtd520 driver to use the new `auto_attach()` method in
`struct comedi_driver` instead of the `attach_pci()` method.  I plan to
remove the `attach_pci()` and `attach_usb()` methods once nothing is
using them.

Tag the new `rtd520_auto_attach()` function definition with `__devinit`
as it is only called during PCI probe.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Add ethtool printout to match MII regs
Mark Einon [Tue, 30 Oct 2012 21:23:29 +0000 (21:23 +0000)]
staging: et131x: Add ethtool printout to match MII regs

In the ethtool call et131x_get_regs(), some MII regs are missing.
Add them to the regs returned.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zram: handle mem suffixes in disk size zram_sysfs parameter
Sergey Senozhatsky [Tue, 30 Oct 2012 19:42:31 +0000 (22:42 +0300)]
staging: zram: handle mem suffixes in disk size zram_sysfs parameter

Use memparse() to allow mem suffixes in disksize sysfs number.
Examples:
    echo 256K > /sys/block/zram0/disksize
    echo 512M > /sys/block/zram0/disksize
    echo 1G > /sys/block/zram0/disksize

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zram: factor-out zram_decompress_page() function
Sergey Senozhatsky [Tue, 30 Oct 2012 19:40:23 +0000 (22:40 +0300)]
staging: zram: factor-out zram_decompress_page() function

zram_bvec_read() shared decompress functionality with zram_read_before_write() function.
Factor-out and make commonly used zram_decompress_page() function, which also simplified
error handling in zram_bvec_read().

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Remove typedef stLocalSFAddRequestAlt.
Kevin McKinney [Wed, 31 Oct 2012 01:50:44 +0000 (21:50 -0400)]
Staging: bcm: Remove typedef stLocalSFAddRequestAlt.

This patch removes typedef
stLocalSFAddRequestAlt in CmHost.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Remove typedef for stLocalSFAddIndicationAlt and call directly.
Kevin McKinney [Wed, 31 Oct 2012 01:50:43 +0000 (21:50 -0400)]
Staging: bcm: Remove typedef for stLocalSFAddIndicationAlt and call directly.

This patch removes typedef for
stLocalSFAddIndicationAlt, changes the
name of the struct to bcm_add_indication_alt,
and removes a comment. In addition, any
calls to typedef stLocalSFAddIndicationAlt
are changed to call the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: csr_log_configure.h: remove a bunch of function protos
Devendra Naga [Tue, 30 Oct 2012 19:18:43 +0000 (15:18 -0400)]
staging: csr: csr_log_configure.h: remove a bunch of function protos

all protos that are removed does not have a function definition
so remove all of them together

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: remove csr_lib.h
Devendra Naga [Tue, 30 Oct 2012 19:18:42 +0000 (15:18 -0400)]
staging: csr: remove csr_lib.h

remove this header file as no struct or no function is
defined else where in csr.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: os.c: remove braces around single statement blocks
Devendra Naga [Tue, 30 Oct 2012 19:18:41 +0000 (15:18 -0400)]
staging: csr: os.c: remove braces around single statement blocks

remove all braces around single statement if blocks

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: os.c: remove col variable
Devendra Naga [Tue, 30 Oct 2012 19:18:40 +0000 (15:18 -0400)]
staging: csr: os.c: remove col variable

theres no point in checking the col variable,
its always zero, and wont print a new line, actually
its better to have a new line after a set of characters
printed, instead of confusing with the concatenated
characters when called multiple times at a time.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: drv.c: replace spaces with tabs in uf_destroy_device_nodes
Devendra Naga [Tue, 30 Oct 2012 19:18:39 +0000 (15:18 -0400)]
staging: csr: drv.c: replace spaces with tabs in uf_destroy_device_nodes

replace spaces at the start of line with tabs

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: drv.c: replace spaces with tabs
Devendra Naga [Tue, 30 Oct 2012 19:18:38 +0000 (15:18 -0400)]
staging: csr: drv.c: replace spaces with tabs

replace spaces at the start of the line with tabs

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: io.c: replace spaces with tabs
Devendra Naga [Tue, 30 Oct 2012 19:18:37 +0000 (15:18 -0400)]
staging: csr: io.c: replace spaces with tabs

replace the spaces with the tabs at the start of line

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Remove unnecessary PHY register write
Mark Einon [Tue, 30 Oct 2012 18:38:58 +0000 (18:38 +0000)]
staging: et131x: Remove unnecessary PHY register write

The PHY registers are now being controlled from the connected phydev,
so there shouldn't be any reason for the et131x code to perform any
extra setup. Removing the interrupt setup code, and register defines
that are now unused.

On testing, no changes in behaviour were experienced.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Remove unnecessary NULL pointer assignments
Mark Einon [Tue, 30 Oct 2012 18:38:57 +0000 (18:38 +0000)]
staging: et131x: Remove unnecessary NULL pointer assignments

During a previous refactoring excerise, two NULL pointer assingments
were moved to their respective pointer declarations. Dan Carpenter
correctly points out that these assignments are not needed.
Removing them.

Also two small whitespace changes - rejoining split lines, as they are
now less than 80 chars.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Update TODO list in README
Mark Einon [Tue, 30 Oct 2012 18:38:56 +0000 (18:38 +0000)]
staging: et131x: Update TODO list in README

-Added some extra items to the TODO list.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Refactor nic_rx_pkts() to remove indenting
Mark Einon [Tue, 30 Oct 2012 18:38:55 +0000 (18:38 +0000)]
staging: et131x: Refactor nic_rx_pkts() to remove indenting

In nic_rx_pkts() some large chunks of code are indented in 'if (len)'
sections. Refactor the code to remove these indents and re-join longer
split lines.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Remove duplicate code for fbr[0, 1]
Mark Einon [Tue, 30 Oct 2012 18:38:54 +0000 (18:38 +0000)]
staging: et131x: Remove duplicate code for fbr[0, 1]

Several places in et131x.c code is duplicated for fbr[0] and fbr[1].
Remove the duplicate lines and use loops to run over both indicies.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/imx: add support for ARCH_MULTIPLATFORM
Rob Clark [Mon, 29 Oct 2012 08:31:14 +0000 (09:31 +0100)]
staging: drm/imx: add support for ARCH_MULTIPLATFORM

No dependency on plat headers, so only needs Kconfig update to
build for ARCH_MULTIPLATFORM.

Signed-off-by: Rob Clark <rob@ti.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/omap: add support for ARCH_MULTIPLATFORM
Rob Clark [Mon, 29 Oct 2012 08:31:12 +0000 (09:31 +0100)]
staging: drm/omap: add support for ARCH_MULTIPLATFORM

Remove usage of plat/cpu.h and get information from platform data
instead.  This enables omapdrm to be built with ARCH_MULTIPLATFORM.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/omap: remove global drm_device ptr
Rob Clark [Mon, 29 Oct 2012 08:27:50 +0000 (09:27 +0100)]
staging: drm/omap: remove global drm_device ptr

Not actually used anymore.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ced1401: remove useless value cast on kmalloc()
Fengguang Wu [Sat, 27 Oct 2012 03:29:03 +0000 (11:29 +0800)]
staging: ced1401: remove useless value cast on kmalloc()

Casting value returned by k[cmz]alloc to (struct page * *) is useless.

Generated by: scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/omap: only advertise rotation prop if supported
Rob Clark [Thu, 25 Oct 2012 22:14:13 +0000 (17:14 -0500)]
staging: drm/omap: only advertise rotation prop if supported

For hardware that does not have DMM/TILER, there is no rotation,
so no point in getting userspace's hopes up.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi/drivers: use auto_attach instead of attach_pci
Ian Abbott [Tue, 30 Oct 2012 13:30:04 +0000 (13:30 +0000)]
staging: comedi/drivers: use auto_attach instead of attach_pci

Change comedi drivers for PCI boards to use the new `auto_attach()`
method instead of the `attach_pci()` method.  I plan to remove the
`attach_pci()` and `attach_usb()` methods from `struct comedi_driver`
once nothing is using them.

Tag the functions with `__devinit` where they are not already so tagged,
as they are only called during PCI probe.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi/drivers: use auto_attach instead of attach_usb
Ian Abbott [Tue, 30 Oct 2012 13:30:03 +0000 (13:30 +0000)]
staging: comedi/drivers: use auto_attach instead of attach_usb

Change the usbdux, usbduxfast and usbduxsigma drivers to use the new
`auto_attach()` method instead of the `attach_usb()` method.  I plan to
remove the `attach_usb()` and `attach_pci()` methods from `struct
comedi_driver` once nothing is using them.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_eeprom: don't pass the eeprom 'type'
H Hartley Sweeten [Tue, 30 Oct 2012 00:10:14 +0000 (17:10 -0700)]
staging: comedi: addi_eeprom: don't pass the eeprom 'type'

The eeprom 'type' can be found from the boardinfo when needed.
Finding it when needed also makes it clearer what this value is.

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>
11 years agostaging: comedi: addi_eeprom: fix remaining checkpatch.pl issues
H Hartley Sweeten [Tue, 30 Oct 2012 00:09:54 +0000 (17:09 -0700)]
staging: comedi: addi_eeprom: fix remaining checkpatch.pl issues

Fix the following checkpatch.pl issues:

ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line
WARNING: line over 80 characters

This file is now checkpatch.pl clean.

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>
11 years agostaging: comedi: addi_eeprom: cleanup the defines
H Hartley Sweeten [Tue, 30 Oct 2012 00:09:39 +0000 (17:09 -0700)]
staging: comedi: addi_eeprom: cleanup the defines

Fix the whitespace in the defines. This also fixes a couple
checkpatch.pl issues.

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>
11 years agostaging: comedi: addi_eeprom: reformat driver comment
H Hartley Sweeten [Tue, 30 Oct 2012 00:09:25 +0000 (17:09 -0700)]
staging: comedi: addi_eeprom: reformat driver comment

Reformat the driver description comment to use the preferred block
comment style.

The second driver comment block contains the same information as
the first one. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_eeprom: cleanup i_EepromReadMainHeader()
H Hartley Sweeten [Tue, 30 Oct 2012 00:09:11 +0000 (17:09 -0700)]
staging: comedi: addi_eeprom: cleanup i_EepromReadMainHeader()

Add namespace by renaming this CamelCase function to
addi_eeprom_read_info().

Remove the 'type' parameter. This parameter is a char pointer to the
string name of the eeprom type used on the board. This can be found
when needed using the dev pointer.

Change the parameter order so that the comedi_device pointer is passed
first.

The return value is always 0 and it's never checked. Change it to void.

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>
11 years agostaging: comedi: addi_eeprom: cleanup i_EepromReadTimerHeader()
H Hartley Sweeten [Tue, 30 Oct 2012 00:08:55 +0000 (17:08 -0700)]
staging: comedi: addi_eeprom: cleanup i_EepromReadTimerHeader()

Use this function to set the private data instead of doing it in the
i_EepromReadMainHeader() function. Keep the eeprom read code #if 0'ed
out for now.

Add namespace by renaming this CamelCase function to
addi_eeprom_read_timer_info().

Remove the unused str_TimerMainHeader and str_TimerDetails structs.

The return value is always 0 and it's never checked. Change it to void.

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>
11 years agostaging: comedi: addi_eeprom: cleanup i_EepromReadAnlogInputHeader()
H Hartley Sweeten [Tue, 30 Oct 2012 00:08:40 +0000 (17:08 -0700)]
staging: comedi: addi_eeprom: cleanup i_EepromReadAnlogInputHeader()

Add namespace by renaming this CamelCase function to
addi_eeprom_read_ai_info().

Refactor the function so that it stores the data from the eeprom directly
in the private data instead of using the a struct to pass the data back
to i_EepromReadMainHeader(). This allows removing the str_AnalogInputHeader
struct.

The return value is always 0 and it's never checked. Change it to void.

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>
11 years agostaging: comedi: addi_eeprom: cleanup i_EepromReadAnlogOutputHeader()
H Hartley Sweeten [Tue, 30 Oct 2012 00:08:17 +0000 (17:08 -0700)]
staging: comedi: addi_eeprom: cleanup i_EepromReadAnlogOutputHeader()

Add namespace by renaming this CamelCase function to
addi_eeprom_read_ao_info().

Refactor the function so that it stores the data from the eeprom directly
in the private data instead of using the a struct to pass the data back
to i_EepromReadMainHeader(). This allows removing the str_AnalogOutputHeader
struct.

The return value is always 0 and it's never checked. Change it to void.

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>
11 years agostaging: comedi: addi_eeprom: cleanup i_EepromReadDigitalOutputHeader()
H Hartley Sweeten [Tue, 30 Oct 2012 00:08:00 +0000 (17:08 -0700)]
staging: comedi: addi_eeprom: cleanup i_EepromReadDigitalOutputHeader()

Add namespace by renaming this CamelCase function to
addi_eeprom_read_do_info().

Refactor the function so that it stores the data from the eeprom directly
in the private data instead of using the a struct to pass the data back
to i_EepromReadMainHeader(). This allows removing the str_DigitalOutputHeader
struct.

The return value is always 0 and it's never checked. Change it to void.

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>
11 years agostaging: comedi: addi_eeprom: cleanup i_EepromReadDigitalInputHeader()
H Hartley Sweeten [Tue, 30 Oct 2012 00:07:45 +0000 (17:07 -0700)]
staging: comedi: addi_eeprom: cleanup i_EepromReadDigitalInputHeader()

Add namespace by renaming this CamelCase function to
addi_eeprom_read_di_info().

Refactor the function so that it stores the data from the eeprom directly
in the private data instead of using the a struct to pass the data back
to i_EepromReadMainHeader(). This allows removing the str_DigitalInputHeader
struct.

Leave the reads of the unused eeprom data for now.

The return value is always 0 and it's never checked. Change it to void.

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>
11 years agostaging: comedi: addi_eeprom: cleanup i_EepromReadMainHeader()
H Hartley Sweeten [Tue, 30 Oct 2012 00:07:30 +0000 (17:07 -0700)]
staging: comedi: addi_eeprom: cleanup i_EepromReadMainHeader()

Consolidate the two loops used to read the main header data and the
individual function header data from the eeprom.

The structs used to read the main header are not used outside this
function so remove them by reading the eeprom data into local
variables used in the loop.

Consolidate the 'timer' function cases.

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>
11 years agostaging: comedi: addi_eeprom: move the eeprom offset to addi_eeprom_readw()
H Hartley Sweeten [Tue, 30 Oct 2012 00:07:11 +0000 (17:07 -0700)]
staging: comedi: addi_eeprom: move the eeprom offset to addi_eeprom_readw()

All the addi_eeprom_readw() calls have the offset to the start of user
data (0x100) as part of the address calculation. Create a define for this
constant and move it's addition to the address into addi_eeprom_readw().

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>
11 years agostaging: comedi: addi_eeprom: cleanup v_EepromReadWord()
H Hartley Sweeten [Tue, 30 Oct 2012 00:06:57 +0000 (17:06 -0700)]
staging: comedi: addi_eeprom: cleanup v_EepromReadWord()

Add namespace to the function by renaming the CamelCase function to
addi_eeprom_readw().

Rename the CamelCase parameters and local variables.

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>
11 years agostaging: comedi: addi_eeprom: use AMCC_OP_REG_* defines
H Hartley Sweeten [Tue, 30 Oct 2012 00:06:42 +0000 (17:06 -0700)]
staging: comedi: addi_eeprom: use AMCC_OP_REG_* defines

Use the AMCC_OP_REG_* register offset defines for the magic numbers
used to read the nvram data.

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>
11 years agostaging: comedi: addi_eeprom: factor out the nvram read code
H Hartley Sweeten [Tue, 30 Oct 2012 00:06:14 +0000 (17:06 -0700)]
staging: comedi: addi_eeprom: factor out the nvram read code

Factor the code that reads the word from the nvram out of the
w_EepromReadWord() function.

Cleanup the factored out code so it's a bit more concise.

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>
11 years agostaging: comedi: addi_eeprom: cleanup v_EepromWaitBusy()
H Hartley Sweeten [Tue, 30 Oct 2012 00:05:59 +0000 (17:05 -0700)]
staging: comedi: addi_eeprom: cleanup v_EepromWaitBusy()

Add namespace to the function by renaming the CamelCase function to
addi_eeprom_nvram_wait().

Rename the CamelCase local variable.

Refactor the do {} while to make the code a bit more concise.

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>
11 years agostaging: comedi: addi_eeprom: cleanup v_EepromCs76Read()
H Hartley Sweeten [Tue, 30 Oct 2012 00:05:43 +0000 (17:05 -0700)]
staging: comedi: addi_eeprom: cleanup v_EepromCs76Read()

Add namespace to the function by renaming the CamelCase function to
addi_eeprom_read_93c76().

Change the return type of the function to unsigned short and just
return the read value instead of passing it through a pointer.

Rename the CamelCase parameters and local variables.

Make addi_eeprom_cmd_93c76() return the last value so it does not
need to be calculated.

Rename the EE_READ and EE76_CMD_LEN defines so they have namespace
associated with the other 93c76 defines.

Cleanup the loop that reads the eeprom bits so it's a bit more concise.

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>
11 years agostaging: comedi: addi_eeprom: cleanup v_EepromSendCommand76()
H Hartley Sweeten [Tue, 30 Oct 2012 00:05:17 +0000 (17:05 -0700)]
staging: comedi: addi_eeprom: cleanup v_EepromSendCommand76()

Add namespace to the function by renaming the CamelCase function to
addi_eeprom_cmd_93c76().

Rename the CamelCase parameters and local variables.

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>
11 years agostaging: comedi: addi_eeprom: cleanup v_EepromClock76()
H Hartley Sweeten [Tue, 30 Oct 2012 00:05:03 +0000 (17:05 -0700)]
staging: comedi: addi_eeprom: cleanup v_EepromClock76()

Add namespace to the function by renaming the CamelCase function to
addi_eeprom_clk_93c76().

Rename the CamelCase parameter, dw_RegisterValue, to simply 'val'.

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>
11 years agostaging: comedi: addi_eeprom: add defines for the 93c76 eeprom bits
H Hartley Sweeten [Tue, 30 Oct 2012 00:04:48 +0000 (17:04 -0700)]
staging: comedi: addi_eeprom: add defines for the 93c76 eeprom bits

Define the magic values used for the clock, chip-select, data out,
and data in signals to the 93c76 eeprom.

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>
11 years agostaging: comedi: addi_eeprom: rename 'pc_PCIChipInformation'
H Hartley Sweeten [Tue, 30 Oct 2012 00:04:33 +0000 (17:04 -0700)]
staging: comedi: addi_eeprom: rename 'pc_PCIChipInformation'

This variable is the pointer to the string name of the eeprom type
found on the board. This name comes from the boardinfo of the
driver.

For aesthetic reasons, rename it to simply 'type'.

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>
11 years agostaging: comedi: addi_eeprom: rename 'dw_Address'/'w_PCIBoardEepromAddress'
H Hartley Sweeten [Tue, 30 Oct 2012 00:04:10 +0000 (17:04 -0700)]
staging: comedi: addi_eeprom: rename 'dw_Address'/'w_PCIBoardEepromAddress'

This variable is actually the PCI bar 0 i/o address of the device found
with pci_resource_start().

For aesthetic reasons, rename it to 'iobase' and change to type to an
unsigned long.

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>
11 years agostaging: comedi: addi_eeprom: remove the last forward declarations
H Hartley Sweeten [Tue, 30 Oct 2012 00:03:54 +0000 (17:03 -0700)]
staging: comedi: addi_eeprom: remove the last forward declarations

None of the functions in this file are exported. Make them static and
remove the unnecessary forward 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>
11 years agostaging: comedi: addi_eeprom: make the eeprom helper functions static
H Hartley Sweeten [Tue, 30 Oct 2012 00:03:36 +0000 (17:03 -0700)]
staging: comedi: addi_eeprom: make the eeprom helper functions static

The functions used to read the eeprom header information blocks are
only used in this file. Move them to remove the need for the forward
declarations.

The i_EepromReadTimerHeader() function is currently not being used.
Block it out with and #if 0/#endif until it's determined if it should
be removed.

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>
11 years agostaging: comedi: addi_eeprom: make the 93c76 eeprom functions static
H Hartley Sweeten [Tue, 30 Oct 2012 00:03:20 +0000 (17:03 -0700)]
staging: comedi: addi_eeprom: make the 93c76 eeprom functions static

The functions used to read the 93c76 eeprom are only used in this file.
Move them to remove the need for the forward declarations.

Also, remove some of the more obvious comments and fix a couple coding
style issues while moving the 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>