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

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

staging: comedi: das08_isa: use comedi_request_region()



Use comedi_request_region() to request the I/O region used by this
driver.

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 a983834e
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -179,17 +179,18 @@ static int das08_isa_attach(struct comedi_device *dev,
{
	const struct das08_board_struct *thisboard = comedi_board(dev);
	struct das08_private_struct *devpriv;
	int ret;

	devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
	if (!devpriv)
		return -ENOMEM;
	dev->private = devpriv;

	if (!request_region(it->options[0], thisboard->iosize,
			    thisboard->name))
		return -EIO;
	ret = comedi_request_region(dev, it->options[0], thisboard->iosize);
	if (ret)
		return ret;

	return das08_common_attach(dev, it->options[0]);
	return das08_common_attach(dev, dev->iobase);
}

static void das08_isa_detach(struct comedi_device *dev)