Replaced deprecated use of check_region().
authorIan Abbott <abbotti@mev.co.uk>
Mon, 13 Nov 2006 14:11:52 +0000 (14:11 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 13 Nov 2006 14:11:52 +0000 (14:11 +0000)
comedi/drivers/s526.c

index 66cbe50fa19976e171e95f0b5ef84b9456f4cb8e..4f8d1bd2d8acb771ae30271ad8fc8a6141c5c699 100644 (file)
@@ -279,11 +279,10 @@ static int s526_attach(comedi_device *dev,comedi_devconfig *it)
        printk("comedi%d: s526: ", dev->minor);
 
         iobase=it->options[0];
-        if(check_region(iobase, S526_IOSIZE) < 0){
+       if(!iobase || !request_region(iobase, S526_IOSIZE, thisboard->name)){
                 comedi_error(dev,"I/O port conflict");
                 return -EIO;
         }
-        request_region(iobase, S526_IOSIZE, thisboard->name);
         dev->iobase=iobase;
 
        printk("iobase=0x%lux\n", dev->iobase);