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

staging: comedi: addi_apci_3xxx: absorb v_APCI3XXX_Interrupt()

All the boards supported by this driver use the same 'interrupt'
callback in the boardinfo. Absorb the interrupt function from
hwdrv_apci3xxx.c directly into the driver. Rename the CamelCase
function to apci3xxx_irq_handler().

Remove v_ADDI_Interrupt(), which indirectly called the interrupt
function, and use apci3xxx_irq_handler instead when requesting
the irq. Remove the 'interrupt' 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 be68a01e
...@@ -582,38 +582,6 @@ static int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device *dev, ...@@ -582,38 +582,6 @@ static int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device *dev,
return i_ReturnValue; return i_ReturnValue;
} }
static void v_APCI3XXX_Interrupt(int irq, void *d)
{
struct comedi_device *dev = d;
struct addi_private *devpriv = dev->private;
unsigned int status;
int i;
/* Test if interrupt occur */
status = readl(devpriv->dw_AiBase + 16);
if ((status & 0x2) == 0x2) {
/* Reset the interrupt */
writel(status, devpriv->dw_AiBase + 16);
/* Test if interrupt enabled */
if (devpriv->b_EocEosInterrupt == 1) {
/* Read all analog inputs value */
for (i = 0; i < devpriv->ui_AiNbrofChannels; i++) {
unsigned int val;
val = readl(devpriv->dw_AiBase + 28);
devpriv->ui_AiReadData[i] = val;
}
/* Set the interrupt flag */
devpriv->b_EocEosInterrupt = 2;
/* Send a signal to from kernel to user space */
send_sig(SIGIO, devpriv->tsk_Current, 0);
}
}
}
/* /*
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
| ANALOG OUTPUT SUBDEVICE | | ANALOG OUTPUT SUBDEVICE |
......
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