]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
staging: comedi: rti800: use comedi_request_region()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 10 Apr 2013 17:04:54 +0000 (10:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2013 19:52:35 +0000 (12:52 -0700)
Use comedi_request_region() to request the I/O region used by this
driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/rti800.c

index a94dbe7bd4fbf60dfc5f86295d87748adec06945..44bab88b679e093b914e7b68e074d7a33449026b 100644 (file)
@@ -291,14 +291,12 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 {
        const struct rti800_board *board = comedi_board(dev);
        struct rti800_private *devpriv;
-       unsigned long iobase;
-       int ret;
        struct comedi_subdevice *s;
+       int ret;
 
-       iobase = it->options[0];
-       if (!request_region(iobase, RTI800_IOSIZE, dev->board_name))
-               return -EIO;
-       dev->iobase = iobase;
+       ret = comedi_request_region(dev, it->options[0], RTI800_IOSIZE);
+       if (ret)
+               return ret;
 
        outb(0, dev->iobase + RTI800_CSR);
        inb(dev->iobase + RTI800_ADCHI);