]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: das16: use __comedi_request_region()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Apr 2013 23:30:48 +0000 (16:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2013 19:47:54 +0000 (12:47 -0700)
Use __comedi_request_region() to request the additional I/O region
used by this driver.

Remove the error message when the request_region() fails,
comedi_request_reqion() will output the error message if necessary.

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>
drivers/staging/comedi/drivers/das16.c

index 01fe078f3914a88513e6958fbeeeb779d0ddbbe5..50902ccb519373d0f35f408329388f01d89da773 100644 (file)
@@ -1120,13 +1120,10 @@ static int das16_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                if (ret)
                        return ret;
                /* Request an additional region for the 8255 */
-               if (!request_region(dev->iobase + 0x400, board->size & 0x3ff,
-                                   dev->board_name)) {
+               ret = __comedi_request_region(dev, dev->iobase + 0x400,
+                                             board->size & 0x3ff);
+               if (ret) {
                        release_region(dev->iobase, 0x10);
-                       dev_warn(dev->class_dev,
-                                "%s: I/O port conflict (%#lx,%d)\n",
-                                dev->board_name,
-                                dev->iobase + 0x400, board->size & 0x3ff);
                        dev->iobase = 0;
                        return -EIO;
                }