Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317104
b: refs/heads/master
c: 960ca1a
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jun 5, 2012
1 parent 329dd5c commit 5d19207
Show file tree
Hide file tree
Showing 2 changed files with 8 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: b13ff04654b406618f96e59168006c530f4774aa
refs/heads/master: 960ca1ae1e0676dfef699c37362dad1d4fee5397
13 changes: 7 additions & 6 deletions trunk/drivers/staging/comedi/drivers/acl7225b.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ struct boardtype {
int io_range; /* len of I/O space */
};

#define this_board ((const struct boardtype *)dev->board_ptr)

static int acl7225b_do_insn(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
Expand Down Expand Up @@ -67,19 +65,20 @@ static int acl7225b_di_insn(struct comedi_device *dev,
static int acl7225b_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
{
const struct boardtype *board = comedi_board(dev);
struct comedi_subdevice *s;
int iobase, iorange;

iobase = it->options[0];
iorange = this_board->io_range;
iorange = board->io_range;
printk(KERN_INFO "comedi%d: acl7225b: board=%s 0x%04x\n", dev->minor,
this_board->name, iobase);
board->name, iobase);
if (!request_region(iobase, iorange, "acl7225b")) {
printk(KERN_ERR "comedi%d: request_region failed - I/O port conflict\n",
dev->minor);
return -EIO;
}
dev->board_name = this_board->name;
dev->board_name = board->name;
dev->iobase = iobase;
dev->irq = 0;

Expand Down Expand Up @@ -121,8 +120,10 @@ static int acl7225b_attach(struct comedi_device *dev,

static void acl7225b_detach(struct comedi_device *dev)
{
const struct boardtype *board = comedi_board(dev);

if (dev->iobase)
release_region(dev->iobase, this_board->io_range);
release_region(dev->iobase, board->io_range);
}

static const struct boardtype boardtypes[] = {
Expand Down

0 comments on commit 5d19207

Please sign in to comment.