diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-10-14 10:44:21 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-29 15:48:53 +0800 |
commit | f6a154c5c737013865f50c61367d30381a8584f5 (patch) | |
tree | 8eed5be84a6e04791c82fe5464fc9acb28806586 /drivers/staging/comedi/drivers/addi_apci_1500.c | |
parent | staging: comedi: addi_common.c: remove v_ADDI_Interrupt() (diff) | |
download | linux-dev-f6a154c5c737013865f50c61367d30381a8584f5.tar.xz linux-dev-f6a154c5c737013865f50c61367d30381a8584f5.zip |
staging: comedi: addi_common.c: remove included source file
The addi_apci_035 and addi_apci_1500 are the only drivers left that
include this source file. Copy the i_ADDIDATA_InsnReadEeprom() function
from that file to those drivers and remove the addi_common.c file.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/addi_apci_1500.c')
-rw-r--r-- | drivers/staging/comedi/drivers/addi_apci_1500.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c b/drivers/staging/comedi/drivers/addi_apci_1500.c index 857ac9876467..a68840e721a6 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1500.c +++ b/drivers/staging/comedi/drivers/addi_apci_1500.c @@ -9,7 +9,6 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci1500.c" -#include "addi-data/addi_common.c" static const struct addi_board apci1500_boardtypes[] = { { @@ -34,6 +33,23 @@ static const struct addi_board apci1500_boardtypes[] = { }, }; +static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev, + struct comedi_subdevice *s, + struct comedi_insn *insn, + unsigned int *data) +{ + const struct addi_board *this_board = dev->board_ptr; + struct addi_private *devpriv = dev->private; + unsigned short w_Address = CR_CHAN(insn->chanspec); + unsigned short w_Data; + + w_Data = addi_eeprom_readw(devpriv->i_IobaseAmcc, + this_board->pc_EepromChip, 2 * w_Address); + data[0] = w_Data; + + return insn->n; +} + static int apci1500_auto_attach(struct comedi_device *dev, unsigned long context) { |