Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318114
b: refs/heads/master
c: 6bdae56
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jul 19, 2012
1 parent a11fca8 commit c4f6bd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 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: 5d30e51909b61916744e45d3c50cf42569c92c20
refs/heads/master: 6bdae560f46cddc8aeff5bd9c76454168ee8e8ab
15 changes: 2 additions & 13 deletions trunk/drivers/staging/comedi/drivers/dyna_pci10xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@

#define READ_TIMEOUT 50

static DEFINE_MUTEX(start_stop_sem);

static const struct comedi_lrange range_pci1050_ai = { 3, {
BIP_RANGE(10),
BIP_RANGE(5),
Expand Down Expand Up @@ -267,20 +265,15 @@ static int dyna_pci10xx_attach(struct comedi_device *dev,
struct comedi_subdevice *s;
int ret;

mutex_lock(&start_stop_sem);

if (alloc_private(dev, sizeof(struct dyna_pci10xx_private)) < 0) {
printk(KERN_ERR "comedi: dyna_pci10xx: "
"failed to allocate memory!\n");
mutex_unlock(&start_stop_sem);
return -ENOMEM;
}

pcidev = dyna_pci10xx_find_pci_dev(dev, it);
if (!pcidev) {
mutex_unlock(&start_stop_sem);
if (!pcidev)
return -EIO;
}
devpriv->pci_dev = pcidev;

dev->board_name = thisboard->name;
Expand All @@ -289,7 +282,6 @@ static int dyna_pci10xx_attach(struct comedi_device *dev,
if (comedi_pci_enable(pcidev, DRV_NAME)) {
printk(KERN_ERR "comedi: dyna_pci10xx: "
"failed to enable PCI device and request regions!");
mutex_unlock(&start_stop_sem);
return -EIO;
}

Expand All @@ -306,10 +298,8 @@ static int dyna_pci10xx_attach(struct comedi_device *dev,
devpriv->BADR5 = pci_resource_start(pcidev, 5);

ret = comedi_alloc_subdevices(dev, 4);
if (ret) {
mutex_unlock(&start_stop_sem);
if (ret)
return ret;
}

/* analog input */
s = dev->subdevices + 0;
Expand Down Expand Up @@ -353,7 +343,6 @@ static int dyna_pci10xx_attach(struct comedi_device *dev,
s->insn_bits = dyna_pci10xx_do_insn_bits;

devpriv->valid = 1;
mutex_unlock(&start_stop_sem);

printk(KERN_INFO "comedi: dyna_pci10xx: %s - device setup completed!\n",
thisboard->name);
Expand Down

0 comments on commit c4f6bd6

Please sign in to comment.