Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337676
b: refs/heads/master
c: b37f84d
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Nov 6, 2012
1 parent 167201a commit fb1bec9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 29 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: a3de4cd33c63c256b2521e61e487ae99cf313d94
refs/heads/master: b37f84d56af3efcadd3fc01630f029382707e312
31 changes: 3 additions & 28 deletions trunk/drivers/staging/comedi/drivers/addi_apci_1032.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static int apci1032_attach_pci(struct comedi_device *dev,
{
struct addi_private *devpriv;
struct comedi_subdevice *s;
int ret, n_subdevices;
int ret;

dev->board_name = dev->driver->driver_name;

Expand All @@ -62,21 +62,12 @@ static int apci1032_attach_pci(struct comedi_device *dev,
dev->irq = pcidev->irq;
}

n_subdevices = 7;
ret = comedi_alloc_subdevices(dev, n_subdevices);
ret = comedi_alloc_subdevices(dev, 1);
if (ret)
return ret;

/* Allocate and Initialise AI Subdevice Structures */
s = &dev->subdevices[0];
s->type = COMEDI_SUBD_UNUSED;

/* Allocate and Initialise AO Subdevice Structures */
s = &dev->subdevices[1];
s->type = COMEDI_SUBD_UNUSED;

/* Allocate and Initialise DI Subdevice Structures */
s = &dev->subdevices[2];
s = &dev->subdevices[0];
s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE;
s->n_chan = 32;
Expand All @@ -86,22 +77,6 @@ static int apci1032_attach_pci(struct comedi_device *dev,
s->insn_config = i_APCI1032_ConfigDigitalInput;
s->insn_bits = apci1032_di_insn_bits;

/* Allocate and Initialise DO Subdevice Structures */
s = &dev->subdevices[3];
s->type = COMEDI_SUBD_UNUSED;

/* Allocate and Initialise Timer Subdevice Structures */
s = &dev->subdevices[4];
s->type = COMEDI_SUBD_UNUSED;

/* Allocate and Initialise TTL */
s = &dev->subdevices[5];
s->type = COMEDI_SUBD_UNUSED;

/* EEPROM */
s = &dev->subdevices[6];
s->type = COMEDI_SUBD_UNUSED;

apci1032_reset(dev);
return 0;
}
Expand Down

0 comments on commit fb1bec9

Please sign in to comment.