Commit b5fb9e6d authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: rti800: 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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 57d21e28
...@@ -291,14 +291,12 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -291,14 +291,12 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{ {
const struct rti800_board *board = comedi_board(dev); const struct rti800_board *board = comedi_board(dev);
struct rti800_private *devpriv; struct rti800_private *devpriv;
unsigned long iobase;
int ret;
struct comedi_subdevice *s; struct comedi_subdevice *s;
int ret;
iobase = it->options[0]; ret = comedi_request_region(dev, it->options[0], RTI800_IOSIZE);
if (!request_region(iobase, RTI800_IOSIZE, dev->board_name)) if (ret)
return -EIO; return ret;
dev->iobase = iobase;
outb(0, dev->iobase + RTI800_CSR); outb(0, dev->iobase + RTI800_CSR);
inb(dev->iobase + RTI800_ADCHI); inb(dev->iobase + RTI800_ADCHI);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment