Skip to content

Commit

Permalink
staging: comedi: das08_isa: use comedi_request_region()
Browse files Browse the repository at this point in the history
Use comedi_request_region() to request the I/O region used by this
driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 11, 2013
1 parent a983834 commit ed34add
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/staging/comedi/drivers/das08_isa.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,18 @@ static int das08_isa_attach(struct comedi_device *dev,
{
const struct das08_board_struct *thisboard = comedi_board(dev);
struct das08_private_struct *devpriv;
int ret;

devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
if (!devpriv)
return -ENOMEM;
dev->private = devpriv;

if (!request_region(it->options[0], thisboard->iosize,
thisboard->name))
return -EIO;
ret = comedi_request_region(dev, it->options[0], thisboard->iosize);
if (ret)
return ret;

return das08_common_attach(dev, it->options[0]);
return das08_common_attach(dev, dev->iobase);
}

static void das08_isa_detach(struct comedi_device *dev)
Expand Down

0 comments on commit ed34add

Please sign in to comment.