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

staging: comedi: addi_apci_3xxx: absorb apci3xxx_reset()

All the boards supported by this driver use the same 'reset' callback
in the boardinfo. Absorb the reset function, apci3xxx_reset(), from
hwdrv_apci3xxx.c directly into the driver.

Remove i_ADDI_Reset(), which indirectly called the reset function, and
just call apci3xx_reset() directly. Remove the 'reset' callback from
the boardinfo.
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 98d3385d
......@@ -1305,35 +1305,3 @@ static int apci3xxx_do_insn_bits(struct comedi_device *dev,
return insn->n;
}
static int apci3xxx_reset(struct comedi_device *dev)
{
struct addi_private *devpriv = dev->private;
unsigned int val;
int i;
/* Disable the interrupt */
disable_irq(dev->irq);
/* Reset the interrupt flag */
devpriv->b_EocEosInterrupt = 0;
/* Clear the start command */
writel(0, devpriv->dw_AiBase + 8);
/* Reset the interrupt flags */
val = readl(devpriv->dw_AiBase + 16);
writel(val, devpriv->dw_AiBase + 16);
/* clear the EOS */
readl(devpriv->dw_AiBase + 20);
/* Clear the FIFO */
for (i = 0; i < 16; i++)
val = readl(devpriv->dw_AiBase + 28);
/* Enable the interrupt */
enable_irq(dev->irq);
return 0;
}
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