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

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

staging: comedi: pcl818: use __comedi_request_region()



Use __comedi_request_region() to request the additional 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 8cafadee
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -1657,8 +1657,9 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it)
	devpriv->dma_rtc = 0;
	devpriv->dma_rtc = 0;
	if (it->options[2] > 0) {	/*  we want to use DMA */
	if (it->options[2] > 0) {	/*  we want to use DMA */
		if (RTC_lock == 0) {
		if (RTC_lock == 0) {
			if (!request_region(RTC_PORT(0), RTC_IO_EXTENT,
			ret = __comedi_request_resource(dev, RTC_PORT(0),
					    "pcl818 (RTC)"))
							RTC_IO_EXTENT);
			if (ret)
				goto no_rtc;
				goto no_rtc;
		}
		}
		devpriv->rtc_iobase = RTC_PORT(0);
		devpriv->rtc_iobase = RTC_PORT(0);