]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
staging: comedi: acl7225b: use comedi_request_region()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 10 Apr 2013 17:04:32 +0000 (10:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2013 19:52:35 +0000 (12:52 -0700)
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>
drivers/staging/comedi/drivers/acl7225b.c

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