staging: comedi: addi_apci_3120: move apci3120_cancel() to driver
Move this function from the included source file to the main driver source file. 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a68809bb8d
commit
676caedabd
@@ -1,31 +1,3 @@
|
||||
static int apci3120_cancel(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s)
|
||||
{
|
||||
struct apci3120_private *devpriv = dev->private;
|
||||
|
||||
/* Add-On - disable DMA */
|
||||
outw(0, devpriv->addon + 4);
|
||||
|
||||
/* Add-On - disable bus master */
|
||||
apci3120_addon_write(dev, 0, AMCC_OP_REG_AGCSTS);
|
||||
|
||||
/* AMCC - disable bus master */
|
||||
outl(0, devpriv->amcc + AMCC_OP_REG_MCSR);
|
||||
|
||||
/* disable all counters, ext trigger, and reset scan */
|
||||
devpriv->ctrl = 0;
|
||||
outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
|
||||
|
||||
/* DISABLE_ALL_INTERRUPT */
|
||||
devpriv->mode = 0;
|
||||
outb(devpriv->mode, dev->iobase + APCI3120_MODE_REG);
|
||||
|
||||
inw(dev->iobase + APCI3120_STATUS_REG);
|
||||
devpriv->cur_dmabuf = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is a handler for the DMA interrupt.
|
||||
* This function copies the data to Comedi Buffer.
|
||||
|
||||
@@ -560,6 +560,34 @@ static int apci3120_ai_cmdtest(struct comedi_device *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int apci3120_cancel(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s)
|
||||
{
|
||||
struct apci3120_private *devpriv = dev->private;
|
||||
|
||||
/* Add-On - disable DMA */
|
||||
outw(0, devpriv->addon + 4);
|
||||
|
||||
/* Add-On - disable bus master */
|
||||
apci3120_addon_write(dev, 0, AMCC_OP_REG_AGCSTS);
|
||||
|
||||
/* AMCC - disable bus master */
|
||||
outl(0, devpriv->amcc + AMCC_OP_REG_MCSR);
|
||||
|
||||
/* disable all counters, ext trigger, and reset scan */
|
||||
devpriv->ctrl = 0;
|
||||
outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
|
||||
|
||||
/* DISABLE_ALL_INTERRUPT */
|
||||
devpriv->mode = 0;
|
||||
outb(devpriv->mode, dev->iobase + APCI3120_MODE_REG);
|
||||
|
||||
inw(dev->iobase + APCI3120_STATUS_REG);
|
||||
devpriv->cur_dmabuf = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int apci3120_ai_eoc(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn,
|
||||
|
||||
Reference in New Issue
Block a user