From: H Hartley Sweeten Date: Fri, 13 Nov 2015 18:11:15 +0000 (-0700) Subject: staging: comedi: adv_pci1710: rename pci171x_d[io]_insn_bits X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6039278668cd162cacc95a883b59b933e39dc2f5;p=linux-beck.git 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: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c index 4a8604f09512..45661228ed56 100644 --- a/drivers/staging/comedi/drivers/adv_pci1710.c +++ b/drivers/staging/comedi/drivers/adv_pci1710.c @@ -387,29 +387,6 @@ static int pci171x_ao_insn_write(struct comedi_device *dev, 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, struct comedi_subdevice *s) { @@ -668,6 +645,29 @@ static int pci171x_ai_cmdtest(struct comedi_device *dev, 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, struct comedi_subdevice *s, struct comedi_insn *insn, @@ -840,7 +840,7 @@ static int pci1710_auto_attach(struct comedi_device *dev, s->n_chan = 16; s->maxdata = 1; s->range_table = &range_digital; - s->insn_bits = pci171x_di_insn_bits; + s->insn_bits = pci1710_di_insn_bits; subdev++; /* Digital Output subdevice */ @@ -850,7 +850,7 @@ static int pci1710_auto_attach(struct comedi_device *dev, s->n_chan = 16; s->maxdata = 1; s->range_table = &range_digital; - s->insn_bits = pci171x_do_insn_bits; + s->insn_bits = pci1710_do_insn_bits; subdev++; /* Counter subdevice (8254) */