staging: comedi: 8255: use __comedi_request_region()

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>
This commit is contained in:
H Hartley Sweeten 2013-04-09 16:30:29 -07:00 committed by Greg Kroah-Hartman
parent ca8b296409
commit e9720fd2b8

View file

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