summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2015-08-24 10:14:04 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-12 18:24:25 -0700
commit7c79c014cba5694633ada77811ce14654dfb8227 (patch)
tree0265f0f60d1e69f78018cc4282fc4ed9f1356674 /drivers
parenta05e94bd5230a90eca2905495e764a0ad707c498 (diff)
staging: comedi: usbduxfast: remove unnecessary semaphore down/up
The semaphore down/up in usbduxfast_attach_common() is not necessary. This function is only called as part of the (*auto_attach) and does not talk to the USB device. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/drivers/usbduxfast.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c
index 9e846b43f54e..149b558a8896 100644
--- a/drivers/staging/comedi/drivers/usbduxfast.c
+++ b/drivers/staging/comedi/drivers/usbduxfast.c
@@ -842,17 +842,12 @@ static int usbduxfast_ai_insn_read(struct comedi_device *dev,
static int usbduxfast_attach_common(struct comedi_device *dev)
{
- struct usbduxfast_private *devpriv = dev->private;
struct comedi_subdevice *s;
int ret;
- down(&devpriv->sem);
-
ret = comedi_alloc_subdevices(dev, 1);
- if (ret) {
- up(&devpriv->sem);
+ if (ret)
return ret;
- }
/* Analog Input subdevice */
s = &dev->subdevices[0];
@@ -868,8 +863,6 @@ static int usbduxfast_attach_common(struct comedi_device *dev)
s->maxdata = 0x1000; /* 12-bit + 1 overflow bit */
s->range_table = &range_usbduxfast_ai_range;
- up(&devpriv->sem);
-
return 0;
}