Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337679
b: refs/heads/master
c: 6835a17
h: refs/heads/master
i:
  337677: 0d8ad95
  337675: 167201a
  337671: aa23586
  337663: 574af93
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Nov 6, 2012
1 parent 6b996ef commit 3adc549
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 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: 6a3734af9aa8b036765b678b1b69b5672fa13679
refs/heads/master: 6835a17a910cf68b500b7542f3eeea6c0f212ede
21 changes: 15 additions & 6 deletions trunk/drivers/staging/comedi/drivers/addi_apci_1032.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ static unsigned int ui_InterruptStatus;
* data[2] : Interrupt mask for the mode 1
* data[3] : Interrupt mask for the mode 2
*/
static int i_APCI1032_ConfigDigitalInput(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
static int apci1032_intr_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
struct addi_private *devpriv = dev->private;
unsigned int ui_TmpValue;
Expand Down Expand Up @@ -175,7 +175,7 @@ static int apci1032_attach_pci(struct comedi_device *dev,
dev->irq = pcidev->irq;
}

ret = comedi_alloc_subdevices(dev, 1);
ret = comedi_alloc_subdevices(dev, 2);
if (ret)
return ret;

Expand All @@ -187,9 +187,18 @@ static int apci1032_attach_pci(struct comedi_device *dev,
s->maxdata = 1;
s->len_chanlist = 32;
s->range_table = &range_digital;
s->insn_config = i_APCI1032_ConfigDigitalInput;
s->insn_bits = apci1032_di_insn_bits;

if (dev->irq) {
s = &dev->subdevices[1];
s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE;
s->n_chan = 1;
s->maxdata = 1;
s->range_table = &range_digital;
s->insn_config = apci1032_intr_insn_config;
}

apci1032_reset(dev);
return 0;
}
Expand Down

0 comments on commit 3adc549

Please sign in to comment.