bus, slot);
return NULL;
}
-/*
- * This function checks and requests an I/O region, reporting an error
- * if there is a conflict.
- */
-static int pc263_request_region(struct comedi_device *dev, unsigned long from,
- unsigned long extent)
-{
- if (!from || !request_region(from, extent, PC263_DRIVER_NAME)) {
- dev_err(dev->class_dev, "I/O port conflict (%#lx,%lu)!\n",
- from, extent);
- return -EIO;
- }
- return 0;
-}
static int pc263_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
const struct pc263_board *thisboard = comedi_board(dev);
int ret;
- dev_info(dev->class_dev, PC263_DRIVER_NAME ": attach\n");
-
/* Process options and reserve resources according to bus type. */
if (is_isa_board(thisboard)) {
- unsigned long iobase = it->options[0];
- ret = pc263_request_region(dev, iobase, PC263_IO_SIZE);
- if (ret < 0)
+ ret = comedi_request_region(dev, it->options[0], PC263_IO_SIZE);
+ if (ret)
return ret;
- return pc263_common_attach(dev, iobase);
+ return pc263_common_attach(dev, dev->iobase);
} else if (is_pci_board(thisboard)) {
struct pci_dev *pci_dev;