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

staging: comedi: addi_apci_3120: move apci3120_timer_enable() to driver source

Move this helper function from the included source file into the main driver
source file.
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 96257426
......@@ -155,18 +155,6 @@ static const struct comedi_lrange range_apci3120_ai = {
}
};
static void apci3120_timer_enable(struct comedi_device *dev,
unsigned int timer, bool enable)
{
struct apci3120_private *devpriv = dev->private;
if (enable)
devpriv->ctrl |= APCI3120_CTRL_GATE(timer);
else
devpriv->ctrl &= ~APCI3120_CTRL_GATE(timer);
outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
}
static int apci3120_ai_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
......
......@@ -208,6 +208,18 @@ static void apci3120_timer_set_mode(struct comedi_device *dev,
outb(devpriv->timer_mode, dev->iobase + APCI3120_TIMER_MODE_REG);
}
static void apci3120_timer_enable(struct comedi_device *dev,
unsigned int timer, bool enable)
{
struct apci3120_private *devpriv = dev->private;
if (enable)
devpriv->ctrl |= APCI3120_CTRL_GATE(timer);
else
devpriv->ctrl &= ~APCI3120_CTRL_GATE(timer);
outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
}
#include "addi-data/hwdrv_apci3120.c"
static void apci3120_dma_alloc(struct comedi_device *dev)
......
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