Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364155
b: refs/heads/master
c: adfaa20
h: refs/heads/master
i:
  364153: cf73fed
  364151: 977fe27
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 19, 2013
1 parent 3854a32 commit e97c224
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 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: a3fd5e517aa5139a77c806a19064fd8e2976b428
refs/heads/master: adfaa207ca4140fe6a09550549308248e651e2b9
22 changes: 8 additions & 14 deletions trunk/drivers/staging/comedi/drivers/das16.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ struct das16_private_struct {
struct timer_list timer; /* for timed interrupt */
volatile short timer_running;
volatile short timer_mode; /* true if using timer mode */

unsigned long extra_iobase;
};

static int das16_cmd_test(struct comedi_device *dev, struct comedi_subdevice *s,
Expand Down Expand Up @@ -1122,11 +1124,9 @@ static int das16_attach(struct comedi_device *dev, struct comedi_devconfig *it)
/* Request an additional region for the 8255 */
ret = __comedi_request_region(dev, dev->iobase + 0x400,
board->size & 0x3ff);
if (ret) {
release_region(dev->iobase, 0x10);
dev->iobase = 0;
return -EIO;
}
if (ret)
return ret;
devpriv->extra_iobase = dev->iobase + 0x400;
}

/* probe id bits to make sure they are consistent */
Expand Down Expand Up @@ -1356,15 +1356,9 @@ static void das16_detach(struct comedi_device *dev)
}
if (dev->irq)
free_irq(dev->irq, dev);
if (dev->iobase) {
if (board->size < 0x400) {
release_region(dev->iobase, board->size);
} else {
release_region(dev->iobase, 0x10);
release_region(dev->iobase + 0x400,
board->size & 0x3ff);
}
}
if (devpriv->extra_iobase)
release_region(devpriv->extra_iobase, board->size & 0x3ff);
comedi_legacy_detach(dev);
}

static const struct das16_board das16_boards[] = {
Expand Down

0 comments on commit e97c224

Please sign in to comment.