staging: comedi: acl7225b: use comedi_request_region()

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
H Hartley Sweeten 2013-04-10 10:04:32 -07:00 committed by Greg Kroah-Hartman
parent 8fdbc75b70
commit 57d21e283f

View file

@ -77,13 +77,11 @@ static int acl7225b_attach(struct comedi_device *dev,
{ {
const struct acl7225b_boardinfo *board = comedi_board(dev); const struct acl7225b_boardinfo *board = comedi_board(dev);
struct comedi_subdevice *s; struct comedi_subdevice *s;
int iobase;
int ret; int ret;
iobase = it->options[0]; ret = comedi_request_region(dev, it->options[0], board->io_range);
if (!request_region(iobase, board->io_range, dev->board_name)) if (ret)
return -EIO; return ret;
dev->iobase = iobase;
ret = comedi_alloc_subdevices(dev, 3); ret = comedi_alloc_subdevices(dev, 3);
if (ret) if (ret)