Commit 91fe97f3 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: usbduxsigma: remove dev_{level} messages in submit urbs functions

The usbduxsub_submit_{In,Out}URBs() functions have a couple development
debug messages that are just added noise. Remove them.

Also, the sanity check of 'usbduxsub', the comedi_device private data, is
not necessary. The callers have already validated it. Remove the checks.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 641b78f3
...@@ -615,9 +615,6 @@ static int usbduxsub_submit_InURBs(struct usbduxsub *usbduxsub) ...@@ -615,9 +615,6 @@ static int usbduxsub_submit_InURBs(struct usbduxsub *usbduxsub)
{ {
int i, errFlag; int i, errFlag;
if (!usbduxsub)
return -EFAULT;
/* Submit all URBs and start the transfer on the bus */ /* Submit all URBs and start the transfer on the bus */
for (i = 0; i < usbduxsub->numOfInBuffers; i++) { for (i = 0; i < usbduxsub->numOfInBuffers; i++) {
/* in case of a resubmission after an unlink... */ /* in case of a resubmission after an unlink... */
...@@ -626,20 +623,10 @@ static int usbduxsub_submit_InURBs(struct usbduxsub *usbduxsub) ...@@ -626,20 +623,10 @@ static int usbduxsub_submit_InURBs(struct usbduxsub *usbduxsub)
usbduxsub->urbIn[i]->dev = usbduxsub->usbdev; usbduxsub->urbIn[i]->dev = usbduxsub->usbdev;
usbduxsub->urbIn[i]->status = 0; usbduxsub->urbIn[i]->status = 0;
usbduxsub->urbIn[i]->transfer_flags = URB_ISO_ASAP; usbduxsub->urbIn[i]->transfer_flags = URB_ISO_ASAP;
dev_dbg(&usbduxsub->interface->dev,
"comedi%d: submitting in-urb[%d]: %p,%p intv=%d\n",
usbduxsub->comedidev->minor, i,
(usbduxsub->urbIn[i]->context),
(usbduxsub->urbIn[i]->dev),
(usbduxsub->urbIn[i]->interval));
errFlag = usb_submit_urb(usbduxsub->urbIn[i], GFP_ATOMIC); errFlag = usb_submit_urb(usbduxsub->urbIn[i], GFP_ATOMIC);
if (errFlag) { if (errFlag)
dev_err(&usbduxsub->interface->dev,
"comedi_: ai: usb_submit_urb(%d) error %d\n",
i, errFlag);
return errFlag; return errFlag;
} }
}
return 0; return 0;
} }
...@@ -647,25 +634,16 @@ static int usbduxsub_submit_OutURBs(struct usbduxsub *usbduxsub) ...@@ -647,25 +634,16 @@ static int usbduxsub_submit_OutURBs(struct usbduxsub *usbduxsub)
{ {
int i, errFlag; int i, errFlag;
if (!usbduxsub)
return -EFAULT;
for (i = 0; i < usbduxsub->numOfOutBuffers; i++) { for (i = 0; i < usbduxsub->numOfOutBuffers; i++) {
dev_dbg(&usbduxsub->interface->dev,
"comedi_: submitting out-urb[%d]\n", i);
/* in case of a resubmission after an unlink... */ /* in case of a resubmission after an unlink... */
usbduxsub->urbOut[i]->context = usbduxsub->comedidev; usbduxsub->urbOut[i]->context = usbduxsub->comedidev;
usbduxsub->urbOut[i]->dev = usbduxsub->usbdev; usbduxsub->urbOut[i]->dev = usbduxsub->usbdev;
usbduxsub->urbOut[i]->status = 0; usbduxsub->urbOut[i]->status = 0;
usbduxsub->urbOut[i]->transfer_flags = URB_ISO_ASAP; usbduxsub->urbOut[i]->transfer_flags = URB_ISO_ASAP;
errFlag = usb_submit_urb(usbduxsub->urbOut[i], GFP_ATOMIC); errFlag = usb_submit_urb(usbduxsub->urbOut[i], GFP_ATOMIC);
if (errFlag) { if (errFlag)
dev_err(&usbduxsub->interface->dev,
"comedi_: ao: usb_submit_urb(%d) error %d\n",
i, errFlag);
return errFlag; return errFlag;
} }
}
return 0; 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