Commit 7c79c014 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a05e94bd
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment