summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2015-08-05 10:45:08 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-07 15:03:30 -0700
commit576694d83e4b014f66e673fced80fb40be3c35b9 (patch)
tree48dbf214f9174543f1177dadbe5848cc71c51d78 /drivers
parent11e480c3a64355b55ac23aaa3250fcc85f260530 (diff)
staging: comedi: me4000: absorb ai_write_timer()
This function is only called by me4000_ai_do_cmd(). Absorb it. 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')
-rw-r--r--drivers/staging/comedi/drivers/me4000.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c
index c467eb75b17f..ecdf6738ab02 100644
--- a/drivers/staging/comedi/drivers/me4000.c
+++ b/drivers/staging/comedi/drivers/me4000.c
@@ -635,26 +635,6 @@ static void me4000_ai_round_cmd_args(struct comedi_device *dev,
}
}
-static void ai_write_timer(struct comedi_device *dev)
-{
- struct me4000_private *devpriv = dev->private;
-
- outl(devpriv->ai_init_ticks - 1,
- dev->iobase + ME4000_AI_SCAN_PRE_TIMER_LOW_REG);
- outl(0x0, dev->iobase + ME4000_AI_SCAN_PRE_TIMER_HIGH_REG);
-
- if (devpriv->ai_scan_ticks) {
- outl(devpriv->ai_scan_ticks - 1,
- dev->iobase + ME4000_AI_SCAN_TIMER_LOW_REG);
- outl(0x0, dev->iobase + ME4000_AI_SCAN_TIMER_HIGH_REG);
- }
-
- outl(devpriv->ai_chan_ticks - 1,
- dev->iobase + ME4000_AI_CHAN_PRE_TIMER_REG);
- outl(devpriv->ai_chan_ticks - 1,
- dev->iobase + ME4000_AI_CHAN_TIMER_REG);
-}
-
static int me4000_ai_write_chanlist(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_cmd *cmd)
@@ -695,7 +675,20 @@ static int me4000_ai_do_cmd(struct comedi_device *dev,
return err;
/* Write timer arguments */
- ai_write_timer(dev);
+ outl(devpriv->ai_init_ticks - 1,
+ dev->iobase + ME4000_AI_SCAN_PRE_TIMER_LOW_REG);
+ outl(0x0, dev->iobase + ME4000_AI_SCAN_PRE_TIMER_HIGH_REG);
+
+ if (devpriv->ai_scan_ticks) {
+ outl(devpriv->ai_scan_ticks - 1,
+ dev->iobase + ME4000_AI_SCAN_TIMER_LOW_REG);
+ outl(0x0, dev->iobase + ME4000_AI_SCAN_TIMER_HIGH_REG);
+ }
+
+ outl(devpriv->ai_chan_ticks - 1,
+ dev->iobase + ME4000_AI_CHAN_PRE_TIMER_REG);
+ outl(devpriv->ai_chan_ticks - 1,
+ dev->iobase + ME4000_AI_CHAN_TIMER_REG);
/* Reset control register */
outl(0, dev->iobase + ME4000_AI_CTRL_REG);