Commit 60392786 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: adv_pci1710: rename pci171x_d[io]_insn_bits

Rename these functions so they have namespace associated with the driver.

For aesthetics, move the functions so they are not located in the middle
of the analog input/output support functions.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f1f4ce64
...@@ -387,29 +387,6 @@ static int pci171x_ao_insn_write(struct comedi_device *dev, ...@@ -387,29 +387,6 @@ static int pci171x_ao_insn_write(struct comedi_device *dev,
return insn->n; return insn->n;
} }
static int pci171x_di_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
data[1] = inw(dev->iobase + PCI171X_DI_REG);
return insn->n;
}
static int pci171x_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
if (comedi_dio_update_state(s, data))
outw(s->state, dev->iobase + PCI171X_DO_REG);
data[1] = s->state;
return insn->n;
}
static int pci171x_ai_cancel(struct comedi_device *dev, static int pci171x_ai_cancel(struct comedi_device *dev,
struct comedi_subdevice *s) struct comedi_subdevice *s)
{ {
...@@ -668,6 +645,29 @@ static int pci171x_ai_cmdtest(struct comedi_device *dev, ...@@ -668,6 +645,29 @@ static int pci171x_ai_cmdtest(struct comedi_device *dev,
return 0; return 0;
} }
static int pci1710_di_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
data[1] = inw(dev->iobase + PCI171X_DI_REG);
return insn->n;
}
static int pci1710_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
if (comedi_dio_update_state(s, data))
outw(s->state, dev->iobase + PCI171X_DO_REG);
data[1] = s->state;
return insn->n;
}
static int pci1710_counter_insn_config(struct comedi_device *dev, static int pci1710_counter_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
struct comedi_insn *insn, struct comedi_insn *insn,
...@@ -840,7 +840,7 @@ static int pci1710_auto_attach(struct comedi_device *dev, ...@@ -840,7 +840,7 @@ static int pci1710_auto_attach(struct comedi_device *dev,
s->n_chan = 16; s->n_chan = 16;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = pci171x_di_insn_bits; s->insn_bits = pci1710_di_insn_bits;
subdev++; subdev++;
/* Digital Output subdevice */ /* Digital Output subdevice */
...@@ -850,7 +850,7 @@ static int pci1710_auto_attach(struct comedi_device *dev, ...@@ -850,7 +850,7 @@ static int pci1710_auto_attach(struct comedi_device *dev,
s->n_chan = 16; s->n_chan = 16;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = pci171x_do_insn_bits; s->insn_bits = pci1710_do_insn_bits;
subdev++; subdev++;
/* Counter subdevice (8254) */ /* Counter subdevice (8254) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment