diff options
| author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-01-23 12:41:36 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 12:00:29 -0800 |
| commit | 87c38fbed5bb706785be9171ed4a9b41faf17e13 (patch) | |
| tree | 4d769d289b38c146c9e3f22947532b1a5f9ad7b3 | |
| parent | 9f89ce8c62175e1f5bad495241ea34f288b2596c (diff) | |
staging: comedi: addi_apci_3501: board has an eeprom
The board supported by this driver has an on-board eeprom. Since
we need to read it to get the number of analog output channels,
expose the eeprom as a readable subdevice to the user.
Rename the i_ADDIDATA_InsnReadEeprom() function to give it namespace
associated with the driver.
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_apci_3501.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c index 2302e5acbfc1..48f7c82b2a9c 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3501.c +++ b/drivers/staging/comedi/drivers/addi_apci_3501.c @@ -50,7 +50,7 @@ static int apci3501_do_insn_bits(struct comedi_device *dev, return insn->n; } -static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev, +static int apci3501_eeprom_insn_read(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) @@ -256,15 +256,11 @@ static int apci3501_auto_attach(struct comedi_device *dev, /* EEPROM */ s = &dev->subdevices[6]; - if (this_board->i_PCIEeprom) { - s->type = COMEDI_SUBD_MEMORY; - s->subdev_flags = SDF_READABLE | SDF_INTERNAL; - s->n_chan = 256; - s->maxdata = 0xffff; - s->insn_read = i_ADDIDATA_InsnReadEeprom; - } else { - s->type = COMEDI_SUBD_UNUSED; - } + s->type = COMEDI_SUBD_MEMORY; + s->subdev_flags = SDF_READABLE | SDF_INTERNAL; + s->n_chan = 256; + s->maxdata = 0xffff; + s->insn_read = apci3501_eeprom_insn_read; apci3501_reset(dev); return 0; |
