Skip to content

Commit

Permalink
staging: comedi: 8255: use __comedi_request_region()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 11, 2013
1 parent ca8b296 commit e9720fd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/staging/comedi/drivers/8255.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit e9720fd

Please sign in to comment.