diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-10-30 04:09:11 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-30 21:50:14 +0400 |
commit | a927077c62688d1afefcda6da2a15d14a578a089 (patch) | |
tree | af5e7147017275187e2abc51c87900d5ed6e3074 | |
parent | 6f98fe207bfc457d9d1d40c4573f3eec8dcb2cae (diff) | |
download | linux-a927077c62688d1afefcda6da2a15d14a578a089.tar.xz |
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>
-rw-r--r-- | drivers/staging/comedi/drivers/addi-data/addi_common.c | 3 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/addi-data/addi_eeprom.c | 9 |
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c index 9064293c51ff..79beff15d68c 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c @@ -217,8 +217,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it) printk("\nEnable the interrupt for the controller"); } printk("\nRead Eeprom"); - i_EepromReadMainHeader(io_addr[0], this_board->pc_EepromChip, - dev); + addi_eeprom_read_info(dev, io_addr[0]); } else { printk("\nPCI Eeprom unused"); } diff --git a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c index 7aa67a887775..fff04f81d92c 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c @@ -328,10 +328,11 @@ static void addi_eeprom_read_ai_info(struct comedi_device *dev, devpriv->s_EeParameters.i_AiMaxdata = 0xffff >> (16 - tmp); } -static int i_EepromReadMainHeader(unsigned long iobase, - char *type, - struct comedi_device *dev) +static void addi_eeprom_read_info(struct comedi_device *dev, + unsigned long iobase) { + const struct addi_board *this_board = comedi_board(dev); + char *type = this_board->pc_EepromChip; unsigned short size; unsigned char nfuncs; int i; @@ -372,6 +373,4 @@ static int i_EepromReadMainHeader(unsigned long iobase, break; } } - - return 0; } |