Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364040
b: refs/heads/master
c: d7849ef
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 11, 2013
1 parent 314deac commit 5003d9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 71827d43421824a11ac50d83b9e212061a84b025
refs/heads/master: d7849efa932cc1799b51542c1b1975ff799e9fe0
26 changes: 4 additions & 22 deletions trunk/drivers/staging/comedi/drivers/amplc_pc236.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,21 +208,6 @@ static struct pci_dev *pc236_find_pci_dev(struct comedi_device *dev,
return NULL;
}

/*
* This function checks and requests an I/O region, reporting an error
* if there is a conflict.
*/
static int pc236_request_region(struct comedi_device *dev, unsigned long from,
unsigned long extent)
{
if (!from || !request_region(from, extent, PC236_DRIVER_NAME)) {
dev_err(dev->class_dev, "I/O port conflict (%#lx,%lu)!\n",
from, extent);
return -EIO;
}
return 0;
}

/*
* This function is called to mark the interrupt as disabled (no command
* configured on subdevice 1) and to physically disable the interrupt
Expand Down Expand Up @@ -491,21 +476,18 @@ static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it)
struct pc236_private *devpriv;
int ret;

dev_info(dev->class_dev, PC236_DRIVER_NAME ": attach\n");

devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
if (!devpriv)
return -ENOMEM;
dev->private = devpriv;

/* Process options according to bus type. */
if (is_isa_board(thisboard)) {
unsigned long iobase = it->options[0];
unsigned int irq = it->options[1];
ret = pc236_request_region(dev, iobase, PC236_IO_SIZE);
if (ret < 0)
ret = comedi_request_region(dev, it->options[0], PC236_IO_SIZE);
if (ret)
return ret;
return pc236_common_attach(dev, iobase, irq, 0);

return pc236_common_attach(dev, dev->iobase, it->options[1], 0);
} else if (is_pci_board(thisboard)) {
struct pci_dev *pci_dev;

Expand Down

0 comments on commit 5003d9f

Please sign in to comment.