]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 years agostaging: comedi: addi_eeprom: make v_EepromWaitBusy() static
H Hartley Sweeten [Tue, 30 Oct 2012 00:03:05 +0000 (17:03 -0700)]
staging: comedi: addi_eeprom: make v_EepromWaitBusy() static

This function is only used in this file. Move it to remove the need
for the forward declaration.

Also, remove the comment about an error in the data book. It's not
really an error just someones misunderstanding about doing a byte
read of a dword register.

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>
12 years agostaging: comedi: addi_eeprom: remove extra whitespace and comment cruft
H Hartley Sweeten [Tue, 30 Oct 2012 00:02:42 +0000 (17:02 -0700)]
staging: comedi: addi_eeprom: remove extra whitespace and comment cruft

Remove the extra whitespace and the comment cruft in this file.

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>
12 years agostaging: comedi: APCI1710_Ttl: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:58:10 +0000 (16:58 -0700)]
staging: comedi: APCI1710_Ttl: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: APCI1710_Tor: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:57:52 +0000 (16:57 -0700)]
staging: comedi: APCI1710_Tor: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: APCI1710_Ssi: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:57:34 +0000 (16:57 -0700)]
staging: comedi: APCI1710_Ssi: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: APCI1710_Inp_cpt: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:57:17 +0000 (16:57 -0700)]
staging: comedi: APCI1710_Inp_cpt: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: APCI1710_Dig_io: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:56:58 +0000 (16:56 -0700)]
staging: comedi: APCI1710_Dig_io: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: hwdrv_APCI1710: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:56:40 +0000 (16:56 -0700)]
staging: comedi: hwdrv_APCI1710: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: hwdrv_apci3501: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:56:19 +0000 (16:56 -0700)]
staging: comedi: hwdrv_apci3501: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: hwdrv_apci2200: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:56:02 +0000 (16:56 -0700)]
staging: comedi: hwdrv_apci2200: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: hwdrv_apci2032: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:55:43 +0000 (16:55 -0700)]
staging: comedi: hwdrv_apci2032: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: hwdrv_apci2016: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:55:24 +0000 (16:55 -0700)]
staging: comedi: hwdrv_apci2016: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: hwdrv_apci16xx: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:55:05 +0000 (16:55 -0700)]
staging: comedi: hwdrv_apci16xx: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: hwdrv_apci1564: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:54:46 +0000 (16:54 -0700)]
staging: comedi: hwdrv_apci1564: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: hwdrv_apci1516: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:54:26 +0000 (16:54 -0700)]
staging: comedi: hwdrv_apci1516: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: hwdrv_apci1500: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:54:08 +0000 (16:54 -0700)]
staging: comedi: hwdrv_apci1500: remove forward declarations

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>
12 years agostaging: comedi: hwdrv_apci1032: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:53:53 +0000 (16:53 -0700)]
staging: comedi: hwdrv_apci1032: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: hwdrv_apci035: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:53:33 +0000 (16:53 -0700)]
staging: comedi: hwdrv_apci035: remove forward declarations

None of the functions in this file are exported. Make all of 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>
12 years agostaging: comedi: addi_common: remove forward declarations
H Hartley Sweeten [Mon, 29 Oct 2012 23:53:14 +0000 (16:53 -0700)]
staging: comedi: addi_common: remove forward declarations

Move some of the functions in this file to remove the need for the
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>
12 years agostaging: comedi: addi_common: remove the extra cruft
H Hartley Sweeten [Mon, 29 Oct 2012 23:52:58 +0000 (16:52 -0700)]
staging: comedi: addi_common: remove the extra cruft

The individual addi-data files all define ADDIDATA_DRIVER_NAME. Remove
the #ifndef/#define for it in addi_common.c.

Remove the commented out MODULE_* stuff. The individual addi-data drivers
have this information.

Remove the, badly formatted, function comments. The functions are
obvious.

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>
12 years agostaging: comedi: addi-data: remove the boardinfo #ifdef'ery
H Hartley Sweeten [Mon, 29 Oct 2012 23:52:36 +0000 (16:52 -0700)]
staging: comedi: addi-data: remove the boardinfo #ifdef'ery

Move the boardinfo for each addi-data driver from addi_common.c to
the individual driver files. This removes the need #ifdef'ery.

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>
12 years agostaging: comedi: addi-data: remove the MODULE_DEVICE_TABLE #ifdef'ery
H Hartley Sweeten [Mon, 29 Oct 2012 23:52:20 +0000 (16:52 -0700)]
staging: comedi: addi-data: remove the MODULE_DEVICE_TABLE #ifdef'ery

Move the MODULE_DEVICE_TABLE for each addi-data driver from addi_common.c
to the individual driver files. This removes the need #ifdef'ery.

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>
12 years agostaging: comedi: addi-data: remove the addi-data #include ifdef'ery
H Hartley Sweeten [Mon, 29 Oct 2012 23:52:03 +0000 (16:52 -0700)]
staging: comedi: addi-data: remove the addi-data #include ifdef'ery

Move the addi-data specific #include's from addi_common.h to the
individual driver files.

The apci-1710, apci-3200, and apci-3300 drivers still have floating
point code in them and are currently disabled in the Kconfig and
Makefile. For now, move the fpu_{begin,end} functions from addi_common.c
to the main driver file so we can get rid of the #ifdef'ery.

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>
12 years agostaging: comedi: addi-data: remove this_board macro
H Hartley Sweeten [Mon, 29 Oct 2012 23:51:47 +0000 (16:51 -0700)]
staging: comedi: addi-data: remove this_board macro

This macro relies on a local variable having a specific name. 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>
12 years agostaging: comedi: addi-data: move the main #include's to the drivers
H Hartley Sweeten [Mon, 29 Oct 2012 23:51:33 +0000 (16:51 -0700)]
staging: comedi: addi-data: move the main #include's to the drivers

The addi-data drivers are all built by the main driver files including
addi-data/addi_common.c. That file then includes other files depending
on what driver is being compiled. This is makes the code quite messy
and hard to follow.

Start cleaning it up by removing the unneeded #include's in addi_common.c
and moving the some of the comedi #include's into the individual driver
files.

This is the first step in getting rid of the #ifdef'ery in addi_common.c.

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>
12 years agostaging: comedi: addi_common: move module init code to EOF
H Hartley Sweeten [Mon, 29 Oct 2012 23:51:16 +0000 (16:51 -0700)]
staging: comedi: addi_common: move module init code to EOF

Move the module_{init,exit} code and associated variables to the end
of the file.

Use module_comedi_pci_driver() to remove the module init boilerplate.

For aesthetic reasons, rename the comedi_driver and pci_driver from
driver_* to *_driver.

Remove the forward declarations for i_ADDI_{Attach,Detach}.

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>
12 years agostaging: comedi: rtd520: cleanup TS_* defines
H Hartley Sweeten [Mon, 29 Oct 2012 17:10:14 +0000 (10:10 -0700)]
staging: comedi: rtd520: cleanup TS_* defines

Convert these to bit shifts and cleanup the whitespace and comments.

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>
12 years agostaging: comedi: rtd520: cleanup FS_* defines
H Hartley Sweeten [Mon, 29 Oct 2012 17:09:31 +0000 (10:09 -0700)]
staging: comedi: rtd520: cleanup FS_* defines

Convert these to bit shifts and cleanup the whitespace and comments.

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>
12 years agostaging: comedi: rtd520: cleanup the LCFG_* defines
H Hartley Sweeten [Mon, 29 Oct 2012 17:09:04 +0000 (10:09 -0700)]
staging: comedi: rtd520: cleanup the LCFG_* defines

Fixes all the > 80 char checkpatch.pl issues with these defines.

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>
12 years agostaging: comedi: rtd520: cleanup the LAS1_* defines
H Hartley Sweeten [Mon, 29 Oct 2012 17:08:48 +0000 (10:08 -0700)]
staging: comedi: rtd520: cleanup the LAS1_* defines

Fixes all the > 80 char checkpatch.pl issues with these defines.

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>
12 years agostaging: comedi: rtd520: cleanup the LAS0_* defines
H Hartley Sweeten [Mon, 29 Oct 2012 17:08:24 +0000 (10:08 -0700)]
staging: comedi: rtd520: cleanup the LAS0_* defines

Fixes all the > 80 char checkpatch.pl issues with these defines.

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>
12 years agostaging: comedi: rtd520: remove unused LAS0_SPARE_* defines
H Hartley Sweeten [Mon, 29 Oct 2012 17:08:07 +0000 (10:08 -0700)]
staging: comedi: rtd520: remove unused LAS0_SPARE_* defines

These register offset defines are not used. 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>
12 years agostaging: comedi: rtd520: move #include's to top of file
H Hartley Sweeten [Mon, 29 Oct 2012 17:07:47 +0000 (10:07 -0700)]
staging: comedi: rtd520: move #include's to top of file

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>
12 years agostaging: comedi: rtd520: add whitespace to the subdevice init
H Hartley Sweeten [Mon, 29 Oct 2012 17:07:21 +0000 (10:07 -0700)]
staging: comedi: rtd520: add whitespace to the subdevice init

To improve the readability, add some whitespace to the subdevice
init.

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>
12 years agostaging: comedi: rtd520: remove 'aiMaxGain' from boardinfo
H Hartley Sweeten [Mon, 29 Oct 2012 17:07:01 +0000 (10:07 -0700)]
staging: comedi: rtd520: remove 'aiMaxGain' from boardinfo

This value is only used in the attach to determine which range
table the analog input subdevice uses. Remove this variable and
just pass the range table pointer in the boardinfo.

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>
12 years agostaging: comedi: rtd520: remove 'aiChans' and 'aiBits' from boardinfo
H Hartley Sweeten [Mon, 29 Oct 2012 17:06:34 +0000 (10:06 -0700)]
staging: comedi: rtd520: remove 'aiChans' and 'aiBits' from boardinfo

All the boards supported by this driver have the same number of analog
input channels and resolution. Remove the boardinfo for this and just
open-code the values in the attach.

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>
12 years agostaging: comedi: rtd520: allow attaching without interrupt support
H Hartley Sweeten [Mon, 29 Oct 2012 17:06:03 +0000 (10:06 -0700)]
staging: comedi: rtd520: allow attaching without interrupt support

Interrupts ares only required for the ai subdevice command support.

Allow the driver to attach to the board even if request_irq() fails.
Only hook up the command support if the interrupt is available.

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>
12 years agostaging: comedi: rtd520: fix > 80 char line checkpatch.pl issues
H Hartley Sweeten [Mon, 29 Oct 2012 17:05:44 +0000 (10:05 -0700)]
staging: comedi: rtd520: fix > 80 char line checkpatch.pl issues

This fixes all the remaining 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>
12 years agostaging: comedi: rtd520: remove 'intCount' from the private data
H Hartley Sweeten [Mon, 29 Oct 2012 17:04:58 +0000 (10:04 -0700)]
staging: comedi: rtd520: remove 'intCount' from the private data

This variable is cleared when an ai command is initiated and then
incremented with each interrupt. Other than that it's never used.
Just 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>
12 years agostaging: comedi: rtd520: remove DPRINTK messages
H Hartley Sweeten [Mon, 29 Oct 2012 17:04:40 +0000 (10:04 -0700)]
staging: comedi: rtd520: remove DPRINTK messages

These are all development debug messages. A lot of them are in
the interrupt routine and probably shouldn't be there. Some of
the others are actually commented out.

Just remove all of 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>
12 years agostaging: comedi: rtd520: remove code in #if 0/#endif blocks
H Hartley Sweeten [Mon, 29 Oct 2012 17:04:11 +0000 (10:04 -0700)]
staging: comedi: rtd520: remove code in #if 0/#endif blocks

All the #if 0'ed out code is either debug or incomplete. Just 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>
12 years agostaging: comedi: rtd520: convert driver to attach_pci
H Hartley Sweeten [Mon, 29 Oct 2012 17:03:53 +0000 (10:03 -0700)]
staging: comedi: rtd520: convert driver to attach_pci

Convert this driver to use the comedi PCI auto config mechanism
by adding an attach_pci callback.

Since this driver requires no extra configuration options, and
the attach callback is now optional, remove it.

Use the found 'dev->board_name' for the resource name passed to
comedi_pci_enable() and request_irq().

Since this driver no longer walks the pci bus to find the pci_dev,
remove the pci_dev_put() in the detach.

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>
12 years agostaging: comedi: rtd520: remove the board attach noise
H Hartley Sweeten [Mon, 29 Oct 2012 17:03:30 +0000 (10:03 -0700)]
staging: comedi: rtd520: remove the board attach noise

Remove all the kernel noise that is output as the board is
attached. Leave a simple dev_info() after the attach is complete.

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>
12 years agostaging: comedi: rtd520: remove broken USE_DMA code
H Hartley Sweeten [Mon, 29 Oct 2012 17:03:01 +0000 (10:03 -0700)]
staging: comedi: rtd520: remove broken USE_DMA code

It appears the dma code in this driver is seriously broken.
Enabling USE_DMA causes the driver to not even compile.

Just remove all the dma code for now.

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>
12 years agostaging: comedi: rtd520: factor out the board reset
H Hartley Sweeten [Mon, 29 Oct 2012 17:02:39 +0000 (10:02 -0700)]
staging: comedi: rtd520: factor out the board reset

Factor the common code that does the low-level reset of the board
out of rtd_init_board() and rtc_detach().

Fix the if test in rtd_detach() before doing the reset, devpriv->lcfg
could be NULL at this point.

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>
12 years agostaging: comedi: rtd520: factor out the board init
H Hartley Sweeten [Mon, 29 Oct 2012 17:02:19 +0000 (10:02 -0700)]
staging: comedi: rtd520: factor out the board init

Factor the code that does the low-level init of the board out of
rtd_attach().

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>
12 years agostaging: comedi: rtd520: factor out the pci latency quirk
H Hartley Sweeten [Mon, 29 Oct 2012 17:02:03 +0000 (10:02 -0700)]
staging: comedi: rtd520: factor out the pci latency quirk

Factor the code that checks the pci latency timer out of rtd_attach().

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>
12 years agostaging: comedi: rtd520: cleanup pci bar ioremap
H Hartley Sweeten [Mon, 29 Oct 2012 17:01:46 +0000 (10:01 -0700)]
staging: comedi: rtd520: cleanup pci bar ioremap

Use the size returned by pci_resource_len() when ioremap'ing the
pci bars instead of assuming a size.

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>
12 years agoStaging: android: binder: Fixed multi-line strings
Anmol Sarma [Tue, 30 Oct 2012 17:05:43 +0000 (22:35 +0530)]
Staging: android: binder: Fixed multi-line strings

Changed all user visible multi-line strings to single line.
Removed 'binder:' prefix on stings.

Signed-off-by: Anmol Sarma <unmole.in@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: Remove struct CsrEvent
SeongJae Park [Tue, 30 Oct 2012 02:26:13 +0000 (11:26 +0900)]
staging: csr: Remove struct CsrEvent

Nobody use struct CsrEvent. So, remove it.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Remove typedef stLocalSFAddConfirmationAlt.
Kevin McKinney [Tue, 30 Oct 2012 03:08:57 +0000 (23:08 -0400)]
Staging: bcm: Remove typedef stLocalSFAddConfirmationAlt.

This patch removes typedef
stLocalSFAddConfirmationAlt in CmHost.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Remove typedef stLocalSFChangeRequestAlt.
Kevin McKinney [Tue, 30 Oct 2012 03:08:56 +0000 (23:08 -0400)]
Staging: bcm: Remove typedef stLocalSFChangeRequestAlt.

This patch removes typedef
stLocalSFChangeRequestAlt in CmHost.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Remove typedef stLocalSFChangeConfirmationAlt.
Kevin McKinney [Tue, 30 Oct 2012 03:08:55 +0000 (23:08 -0400)]
Staging: bcm: Remove typedef stLocalSFChangeConfirmationAlt.

This patch removes typedef
stLocalSFChangeConfirmationAlt
in CmHost.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Remove typedef for stLocalSFChangeIndicationAlt and call directly.
Kevin McKinney [Tue, 30 Oct 2012 03:08:54 +0000 (23:08 -0400)]
Staging: bcm: Remove typedef for stLocalSFChangeIndicationAlt and call directly.

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

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Change PVOID to void * in CmHost.h
Kevin McKinney [Tue, 30 Oct 2012 03:08:53 +0000 (23:08 -0400)]
Staging: bcm: Change PVOID to void * in CmHost.h

This patch changes PVOID to void *
in CmHost.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Change UINT to unsigned int in CmHost.h
Kevin McKinney [Tue, 30 Oct 2012 03:08:52 +0000 (23:08 -0400)]
Staging: bcm: Change UINT to unsigned int in CmHost.h

This patch changes UINT to unsigned
int in CmHost.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Change ULONG to unsigned long in CmHost.h
Kevin McKinney [Tue, 30 Oct 2012 03:08:51 +0000 (23:08 -0400)]
Staging: bcm: Change ULONG to unsigned long in CmHost.h

This patch changes ULONG to unsigned
long in CmHost.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Change INT to int in CmHost.h
Kevin McKinney [Tue, 30 Oct 2012 03:08:50 +0000 (23:08 -0400)]
Staging: bcm: Change INT to int in CmHost.h

This patch changes INT to int
in CmHost.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Change B_UINT8 to u8 in CmHost.h
Kevin McKinney [Tue, 30 Oct 2012 03:08:49 +0000 (23:08 -0400)]
Staging: bcm: Change B_UINT8 to u8 in CmHost.h

This patch changes B_UINT8 to u8
in CmHost.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Change B_UINT16 to u16 in CmHost.h
Kevin McKinney [Tue, 30 Oct 2012 03:08:48 +0000 (23:08 -0400)]
Staging: bcm: Change B_UINT16 to u16 in CmHost.h

This patch changes B_UINT16 to u16
in CmHost.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Fix all white space issues in CmHost.h
Kevin McKinney [Tue, 30 Oct 2012 03:08:47 +0000 (23:08 -0400)]
Staging: bcm: Fix all white space issues in CmHost.h

This patch fixes all white space issues
in CmHost.h as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Correctly format comments in CmHost.h
Kevin McKinney [Tue, 30 Oct 2012 03:08:46 +0000 (23:08 -0400)]
Staging: bcm: Correctly format comments in CmHost.h

This patch correctly formats comments
in CmHost.h as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/gdm72xx: Use dev_ printks in usb_boot.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:57 +0000 (20:05 +0900)]
staging/gdm72xx: Use dev_ printks in usb_boot.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/gdm72xx: Use dev_ printks in gdm_usb.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:43 +0000 (20:05 +0900)]
staging/gdm72xx: Use dev_ printks in gdm_usb.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/gdm72xx: Use dev_ printks in sdio_boot.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:30 +0000 (20:05 +0900)]
staging/gdm72xx: Use dev_ printks in sdio_boot.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/gdm72xx: Use dev_ printks in gdm_sdio.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:16 +0000 (20:05 +0900)]
staging/gdm72xx: Use dev_ printks in gdm_sdio.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/gdm72xx: Use netdev_ or pr_ printks in netlink_k.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:02 +0000 (20:05 +0900)]
staging/gdm72xx: Use netdev_ or pr_ printks in netlink_k.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

and add pr_fmt.

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/gdm72xx: Use netdev_ or pr_ printks in gdm_qos.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:04:42 +0000 (20:04 +0900)]
staging/gdm72xx: Use netdev_ or pr_ printks in gdm_qos.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

and add pr_fmt.

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/gdm72xx: Use netdev_ or pr_ printks in gdm_wimax.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:03:47 +0000 (20:03 +0900)]
staging/gdm72xx: Use netdev_ or pr_ printks in gdm_wimax.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_emerg(netdev, ... then dev_emerg(dev, ... then pr_emerg(...  to printk(KERN_EMERG ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

and add pr_fmt.

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Change B_UINT8 to u8 in cntrl_SignalingInterface.h
Kevin McKinney [Sun, 28 Oct 2012 00:47:40 +0000 (20:47 -0400)]
Staging: bcm: Change B_UINT8 to u8 in cntrl_SignalingInterface.h

This patch changes B_UINT8 to u8
in cntrl_SignalingInterface.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Change B_UINT16 to u16 in cntrl_SignalingInterface.h
Kevin McKinney [Sun, 28 Oct 2012 00:47:39 +0000 (20:47 -0400)]
Staging: bcm: Change B_UINT16 to u16 in cntrl_SignalingInterface.h

This patch changes B_UINT16 to u16
in cntrl_SignalingInterface.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Change B_UINT32 to u32 cntrl_SignalingInterface.h
Kevin McKinney [Sun, 28 Oct 2012 00:47:38 +0000 (20:47 -0400)]
Staging: bcm: Change B_UINT32 to u32 cntrl_SignalingInterface.h

This patch changes B_UINT32 to u32 in
cntrl_SignalingInterface.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: amplc_pci230: use auto_attach() hook
Ian Abbott [Sat, 27 Oct 2012 20:44:18 +0000 (21:44 +0100)]
staging: comedi: amplc_pci230: use auto_attach() hook

Use the new `auto_attach()` hook in the `struct comedi_driver` instead
of the old `attach_pci()` hook.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: vmk80xx: use auto_attach() hook
Ian Abbott [Sat, 27 Oct 2012 20:44:17 +0000 (21:44 +0100)]
staging: comedi: vmk80xx: use auto_attach() hook

Use the new `auto_attach()` hook in the `struct comedi_driver` instead
of the old `attach_usb()` hook.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: add comedi to usb interface helper
Ian Abbott [Sat, 27 Oct 2012 20:44:16 +0000 (21:44 +0100)]
staging: comedi: add comedi to usb interface helper

Add inline helper function `comedi_to_usb_interface()` to get the
pointer to `struct usb_interface` associated with the comedi device.
This pointer is set by the call to `comedi_usb_auto_config()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: support auto_attach() for PCI and USB
Ian Abbott [Sat, 27 Oct 2012 20:44:15 +0000 (21:44 +0100)]
staging: comedi: support auto_attach() for PCI and USB

Allow `comedi_pci_auto_config()` and `comedi_usb_auto_config()` to use
the new `auto_attach()` hook in the low-level driver's `struct
comedi_driver` if it is set and the `attach_pci()` or `attach_usb()`
hook (for PCI or USB respectively) is `NULL`.

Eventually, the `auto_attach()` hook will be the only way of
auto-configuring hardware devices as comedi devices and the bus-type
specific `attach_pci()` and `attach_usb()` hooks will be removed.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: add generic auto-config functions
Ian Abbott [Sat, 27 Oct 2012 20:44:14 +0000 (21:44 +0100)]
staging: comedi: add generic auto-config functions

Add (and export) generic auto-config function `comedi_auto_config()` to
allow hardware devices on arbitrary bus types (e.g. platform devices,
spi devices, etc.) to be auto-configured as comedi devices.  This uses a
new `auto_attach()` hook in the `struct comedi_driver`.  This new hook
will eventually replace the bus-specific `attach_pci()` and
`attach_usb()` hooks in the low-level comedi drivers.

When the `auto_attach()` hook is called in the low-level driver, the
`hw_dev` member of the `struct comedi_device` will have already been set
to the hardware device passed to `comedi_auto_config()`.  The low-level
driver can convert this to some bus-device wrapper structure pointer,
possibly with the help of the `context` parameter that is passed
unchanged from the `comedi_auto_config()` call.

Also export the existing `comedi_auto_unconfig()` function as the
matching call to `comedi_auto_config()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: rename old auto-config functions
Ian Abbott [Sat, 27 Oct 2012 20:44:13 +0000 (21:44 +0100)]
staging: comedi: rename old auto-config functions

Rename `comedi_auto_config()` to `comedi_old_auto_config()`, and
`comedi_auto_config_wrapper()` to `comedi_old_auto_config_wrapper()`.
These functions are deprecated and will be removed once the few
remaining low-level comedi drivers that use them have been updated.
(The low-level drivers in question support auto-configuration of
detected comedi devices, but still use the `attach()` hook in their
`struct comedi_driver` to do so.)

This internal change frees up the name `comedi_auto_config` for future
use.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: change type of auto-config context
Ian Abbott [Sat, 27 Oct 2012 20:44:12 +0000 (21:44 +0100)]
staging: comedi: change type of auto-config context

Change the type of the context parameter passed to
`comedi_auto_config_helper()` from `void *` to `unsigned long`.  It's
currently just an internal change and all current internal usages pass
pointers in the context, but future uses of this function may pass
integer values or pointer values at the whim of a lower-level comedi
driver and the `unsigned long` type expresses this better as it is
commonly used in the Linux kernel to hold such values.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: silicom: remove code requiring an old LINUX_VERSION_CODE
Chad Williamson [Sun, 28 Oct 2012 21:08:18 +0000 (16:08 -0500)]
Staging: silicom: remove code requiring an old LINUX_VERSION_CODE

Remove all code and associated preprocessor logic dependent on an old
LINUX_VERSION_CODE since such code is dead for an in-kernel driver.

Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: dgrp: fix potential NULL defereference issue
Yuanhan Liu [Mon, 29 Oct 2012 05:50:37 +0000 (13:50 +0800)]
staging: dgrp: fix potential NULL defereference issue

Fix a coccinelle warning catched by Fengguang's 0-DAY system:
+ drivers/staging/dgrp/dgrp_net_ops.c:1061:11-27: ERROR: nd is NULL but dereferenced.

Put the "done:" label a bit down would solve this issue.

Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rtl8187se: Fix compile warning 'is static but declared in .. which is not...
Peter Huewe [Mon, 29 Oct 2012 21:33:20 +0000 (22:33 +0100)]
staging/rtl8187se: Fix compile warning 'is static but declared in .. which is not static'

When compiling this driver I get these compile warnings:

ieee80211.h:1227:2: warning: '______f' is static but declared in inline
function 'ieee80211_is_empty_essid' which is not static [enabled by
default]
ieee80211.h:1233:3: warning: '______f' is static but declared in inline
function 'ieee80211_is_empty_essid' which is not static [enabled by
default]
ieee80211.h:1248:2: warning: '______f' is static but declared in inline
function 'ieee80211_is_valid_mode' which is not static [enabled by
default]
ieee80211.h:1253:2: warning: '______f' is static but declared in inline
function 'ieee80211_is_valid_mode' which is not static [enabled by
default]
ieee80211.h:1258:2: warning: '______f' is static but declared in inline
function 'ieee80211_is_valid_mode' which is not static [enabled by
default]
ieee80211.h:1272:3: warning: '______f' is static but declared in inline
function 'ieee80211_get_hdrlen' which is not static [enabled by default]
ieee80211.h:1274:3: warning: '______f' is static but declared in inline
function 'ieee80211_get_hdrlen' which is not static [enabled by default]

These functions are declared as extern inline but not 'overloaded'
anywhere so we can declare them static inline and get rid of the
warnings.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rtl8192e: Fix compile warning 'is static but declared in .. which is not...
Peter Huewe [Mon, 29 Oct 2012 21:18:05 +0000 (22:18 +0100)]
staging/rtl8192e: Fix compile warning 'is static but declared in .. which is not static'

When compiling this driver I get these compile warnings:

rtllib.h:2573:2: warning: '______f' is static but declared in inline
function 'rtllib_is_empty_essid' which is not static [enabled by
default]
rtllib.h:2579:3: warning: '______f' is static but declared in inline
function 'rtllib_is_empty_essid' which is not static [enabled by
default]
rtllib.h:2594:2: warning: '______f' is static but declared in inline
function 'rtllib_is_valid_mode' which is not static [enabled by default]
rtllib.h:2599:2: warning: '______f' is static but declared in inline
function 'rtllib_is_valid_mode' which is not static [enabled by default]
rtllib.h:2604:2: warning: '______f' is static but declared in inline
function 'rtllib_is_valid_mode' which is not static [enabled by default]
rtllib.h:2618:3: warning: '______f' is static but declared in inline
function 'rtllib_get_hdrlen' which is not static [enabled by default]
rtllib.h:2620:3: warning: '______f' is static but declared in inline
function 'rtllib_get_hdrlen' which is not static [enabled by default]

These functions are declared as extern inline but not 'overloaded'
anywhere so we can declare them static inline and get rid of the
warnings.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/comedi: Use dev_ printks in drivers/quatech_daqp_cs.c
YAMANE Toshiaki [Sat, 27 Oct 2012 21:47:26 +0000 (06:47 +0900)]
staging/comedi: Use dev_ printks in drivers/quatech_daqp_cs.c

fixed below checkpatch warnings.
- WARNING: printk() should include KERN_ facility level

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/comedi: Fix trailing statements should be on next line in drivers/quatech_daq...
YAMANE Toshiaki [Sat, 27 Oct 2012 21:46:33 +0000 (06:46 +0900)]
staging/comedi: Fix trailing statements should be on next line in drivers/quatech_daqp_cs.c

fixed below checkpatch errors.
- ERROR: trailing statements should be on next line

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sep: return -EFAULT on copy_from_user failure
Devendra Naga [Sat, 27 Oct 2012 17:23:47 +0000 (13:23 -0400)]
staging: sep: return -EFAULT on copy_from_user failure

copy_from_user() returns the number of bytes remaining to be copied,
and it fails if user pointer is invalid, so return -EFAULT
so that the user gets a FAULT.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging : csr: Fix typo in csr/netdev.c
Masanari Iida [Sun, 28 Oct 2012 12:41:28 +0000 (21:41 +0900)]
staging : csr: Fix typo in csr/netdev.c

Correct spelling typos in csr/netdev.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>