Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337672
b: refs/heads/master
c: 274113f
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Nov 6, 2012
1 parent aa23586 commit a109239
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 31 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: c0133ee10a2542d2a8964321d7d50414b05e0a6a
refs/heads/master: 274113fd788eefa573eba55f47068cf6052beef0
28 changes: 0 additions & 28 deletions trunk/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,31 +278,3 @@ static void v_APCI1032_Interrupt(int irq, void *d)
outl(ui_Temp, dev->iobase + APCI1032_CTRL_REG);
return;
}

/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1032_Reset(struct comedi_device *dev) | |
+----------------------------------------------------------------------------+
| Task :resets all the registers |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
| Return Value : |
| |
+----------------------------------------------------------------------------+
*/

static int i_APCI1032_Reset(struct comedi_device *dev)
{
/* disable the interrupts */
outl(0x0, dev->iobase + APCI1032_CTRL_REG);
/* Reset the interrupt status register */
inl(dev->iobase + APCI1032_STATUS_REG);
/* Disable the and/or interrupt */
outl(0x0, dev->iobase + APCI1032_MODE1_REG);
outl(0x0, dev->iobase + APCI1032_MODE2_REG);

return 0;
}
17 changes: 15 additions & 2 deletions trunk/drivers/staging/comedi/drivers/addi_apci_1032.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d)
return IRQ_RETVAL(1);
}

static int apci1032_reset(struct comedi_device *dev)
{
/* disable the interrupts */
outl(0x0, dev->iobase + APCI1032_CTRL_REG);
/* Reset the interrupt status register */
inl(dev->iobase + APCI1032_STATUS_REG);
/* Disable the and/or interrupt */
outl(0x0, dev->iobase + APCI1032_MODE1_REG);
outl(0x0, dev->iobase + APCI1032_MODE2_REG);

return 0;
}

static int apci1032_attach_pci(struct comedi_device *dev,
struct pci_dev *pcidev)
{
Expand Down Expand Up @@ -80,7 +93,7 @@ static int apci1032_attach_pci(struct comedi_device *dev,
s = &dev->subdevices[6];
s->type = COMEDI_SUBD_UNUSED;

i_APCI1032_Reset(dev);
apci1032_reset(dev);
return 0;
}

Expand All @@ -91,7 +104,7 @@ static void apci1032_detach(struct comedi_device *dev)

if (devpriv) {
if (dev->iobase)
i_APCI1032_Reset(dev);
apci1032_reset(dev);
if (dev->irq)
free_irq(dev->irq, dev);
}
Expand Down

0 comments on commit a109239

Please sign in to comment.