Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337677
b: refs/heads/master
c: 12d606f
h: refs/heads/master
i:
  337675: 167201a
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Nov 6, 2012
1 parent fb1bec9 commit 0d8ad95
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 40 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b37f84d56af3efcadd3fc01630f029382707e312
refs/heads/master: 12d606f75422f4989a853c7c52b06a3b15ef59a2
35 changes: 0 additions & 35 deletions trunk/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,38 +135,3 @@ static int i_APCI1032_ConfigDigitalInput(struct comedi_device *dev,

return insn->n;
}

/*
+----------------------------------------------------------------------------+
| Function Name : static void v_APCI1032_Interrupt |
| (int irq , void *d) |
+----------------------------------------------------------------------------+
| Task : Interrupt handler for the interruptible digital inputs |
+----------------------------------------------------------------------------+
| Input Parameters : int irq : irq number |
| void *d : void pointer |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
| Return Value : TRUE : No error occur |
| : FALSE : Error occur. Return the error |
| |
+----------------------------------------------------------------------------+
*/
static void v_APCI1032_Interrupt(int irq, void *d)
{
struct comedi_device *dev = d;
struct addi_private *devpriv = dev->private;
unsigned int ui_Temp;

/* disable the interrupt */
ui_Temp = inl(dev->iobase + APCI1032_CTRL_REG);
outl(ui_Temp & ~APCI1032_CTRL_INT_ENA,
dev->iobase + APCI1032_CTRL_REG);
ui_InterruptStatus = inl(dev->iobase + APCI1032_STATUS_REG);
ui_InterruptStatus = ui_InterruptStatus & 0X0000FFFF;
send_sig(SIGIO, devpriv->tsk_Current, 0); /* send signal to the sample */
/* enable the interrupt */
outl(ui_Temp, dev->iobase + APCI1032_CTRL_REG);
return;
}
22 changes: 18 additions & 4 deletions trunk/drivers/staging/comedi/drivers/addi_apci_1032.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,24 @@

#include "addi-data/hwdrv_apci1032.c"

static irqreturn_t v_ADDI_Interrupt(int irq, void *d)
static irqreturn_t apci1032_interrupt(int irq, void *d)
{
v_APCI1032_Interrupt(irq, d);
return IRQ_RETVAL(1);
struct comedi_device *dev = d;
struct addi_private *devpriv = dev->private;
unsigned int ctrl;

/* disable the interrupt */
ctrl = inl(dev->iobase + APCI1032_CTRL_REG);
outl(ctrl & ~APCI1032_CTRL_INT_ENA, dev->iobase + APCI1032_CTRL_REG);

ui_InterruptStatus = inl(dev->iobase + APCI1032_STATUS_REG);
ui_InterruptStatus = ui_InterruptStatus & 0X0000FFFF;
send_sig(SIGIO, devpriv->tsk_Current, 0); /* send signal to the sample */

/* enable the interrupt */
outl(ctrl, dev->iobase + APCI1032_CTRL_REG);

return IRQ_HANDLED;
}

static int apci1032_di_insn_bits(struct comedi_device *dev,
Expand Down Expand Up @@ -56,7 +70,7 @@ static int apci1032_attach_pci(struct comedi_device *dev,
dev->iobase = pci_resource_start(pcidev, 2);

if (pcidev->irq > 0) {
ret = request_irq(pcidev->irq, v_ADDI_Interrupt, IRQF_SHARED,
ret = request_irq(pcidev->irq, apci1032_interrupt, IRQF_SHARED,
dev->board_name, dev);
if (ret == 0)
dev->irq = pcidev->irq;
Expand Down

0 comments on commit 0d8ad95

Please sign in to comment.