]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
staging: comedi: 8255: use __comedi_request_region()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Apr 2013 23:30:29 +0000 (16:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2013 19:47:53 +0000 (12:47 -0700)
Use __comedi_request_region() to request the I/O regions 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/8255.c

index 0237187389e44f1661cf0725b88621a244623fac..4b9125097e3b6012c3847ec95c23f4aefaa8fe85 100644 (file)
@@ -372,16 +372,13 @@ static int dev_8255_attach(struct comedi_device *dev,
                s = &dev->subdevices[i];
                iobase = it->options[i];
 
-               if (!request_region(iobase, _8255_SIZE, "8255")) {
-                       dev_warn(dev->class_dev,
-                               "0x%04lx (I/O port conflict)\n", iobase);
-
+               ret = __comedi_request_region(dev, iobase, _8255_SIZE);
+               if (ret) {
                        s->type = COMEDI_SUBD_UNUSED;
                } else {
                        ret = subdev_8255_init(dev, s, NULL, iobase);
                        if (ret)
                                return ret;
-                       dev_info(dev->class_dev, "0x%04lx\n", iobase);
                }
        }