int ret;
struct comedi_subdevice *s;
unsigned char aihi, ailo, fifostat, aistat, intstat, airback;
- unsigned long iobase;
unsigned int irq;
- iobase = it->options[0];
irq = it->options[1];
- printk(KERN_INFO "comedi%d: dmm32at: attaching\n", dev->minor);
- printk(KERN_DEBUG "dmm32at: probing at address 0x%04lx, irq %u\n",
- iobase, irq);
-
- /* register address space */
- if (!request_region(iobase, DMM32AT_MEMSIZE, dev->board_name)) {
- printk(KERN_ERR "comedi%d: dmm32at: I/O port conflict\n",
- dev->minor);
- return -EIO;
- }
- dev->iobase = iobase;
+ ret = comedi_request_region(dev, it->options[0], DMM32AT_MEMSIZE);
+ if (ret)
+ return ret;
/* the following just makes sure the board is there and gets
it to a known state */