Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5950ae51 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: das16m1: use __comedi_request_region()



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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 962e5a36
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -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;
	}