]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
staging: comedi: das16m1: use __comedi_request_region()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Apr 2013 23:31:07 +0000 (16:31 -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/das16m1.c

index 6c4fad5b2455a8071844ee41d244d70a2da8b7bc..77f213b4450b22088b272e7cd76c5e8d86c32edc 100644 (file)
@@ -581,12 +581,11 @@ static int das16m1_attach(struct comedi_device *dev,
        if (ret)
                return ret;
        /* Request an additional region for the 8255 */
-       if (!request_region(dev->iobase + DAS16M1_82C55, DAS16M1_SIZE2,
-                           dev->board_name)) {
+       ret = __comedi_request_region(dev, dev->iobase + DAS16M1_82C55,
+                                     DAS16M1_SIZE2);
+       if (ret) {
                release_region(dev->iobase, DAS16M1_SIZE);
-               dev_warn(dev->class_dev, "%s: I/O port conflict (%#lx,%d)\n",
-                        dev->board_name,
-                        dev->iobase + DAS16M1_82C55, DAS16M1_SIZE2);
+               dev->iobase = 0;
                return -EIO;
        }