Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324632
b: refs/heads/master
c: cb448d6
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 4, 2012
1 parent 48bdced commit d9ff3e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 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: 4bf75257ff84a57d2e878f149514e4fcd23a93bd
refs/heads/master: cb448d6572219efa4a6eb0c98f37125079b78549
27 changes: 3 additions & 24 deletions trunk/drivers/staging/comedi/drivers/adv_pci_dio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,39 +1176,18 @@ static int pci_dio_attach_pci(struct comedi_device *dev,

static void pci_dio_detach(struct comedi_device *dev)
{
const struct dio_boardtype *this_board = comedi_board(dev);
struct pci_dio_private *devpriv = dev->private;
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
int i, j;
struct comedi_subdevice *s;
int subdev;
int i;

if (devpriv) {
if (devpriv->valid)
pci_dio_reset(dev);
subdev = 0;
for (i = 0; i < MAX_DI_SUBDEVS; i++) {
if (this_board->sdi[i].chans)
subdev++;
}
for (i = 0; i < MAX_DO_SUBDEVS; i++) {
if (this_board->sdo[i].chans)
subdev++;
}
for (i = 0; i < MAX_DIO_SUBDEVG; i++) {
for (j = 0; j < this_board->sdio[i].regs; j++) {
s = dev->subdevices + subdev;
subdev_8255_cleanup(dev, s);
subdev++;
}
}
if (this_board->boardid.chans)
subdev++;
for (i = 0; i < MAX_8254_SUBDEVS; i++)
if (this_board->s8254[i].chans)
subdev++;
for (i = 0; i < dev->n_subdevices; i++) {
s = dev->subdevices + i;
if (s->type == COMEDI_SUBD_DIO)
subdev_8255_cleanup(dev, s);
s->private = NULL;
}
}
Expand Down

0 comments on commit d9ff3e8

Please sign in to comment.