diff options
Diffstat (limited to 'drivers/staging/comedi/drivers/usbduxsigma.c')
-rw-r--r-- | drivers/staging/comedi/drivers/usbduxsigma.c | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c index cdd279b..d066351 100644 --- a/drivers/staging/comedi/drivers/usbduxsigma.c +++ b/drivers/staging/comedi/drivers/usbduxsigma.c @@ -2374,7 +2374,7 @@ static void usbdux_firmware_request_complete_handler(const struct firmware *fw, "Could not upload firmware (err=%d)\n", ret); goto out; } - comedi_usb_auto_config(uinterf, &usbduxsigma_driver); + comedi_usb_auto_config(uinterf, &usbduxsigma_driver, 0); out: release_firmware(fw); } @@ -2431,8 +2431,6 @@ static int usbduxsigma_usb_probe(struct usb_interface *uinterf, /* create space for the commands of the DA converter */ usbduxsub[index].dac_commands = kzalloc(NUMOUTCHANNELS, GFP_KERNEL); if (!usbduxsub[index].dac_commands) { - dev_err(dev, "comedi_: usbduxsigma: " - "error alloc space for dac commands\n"); tidy_up(&(usbduxsub[index])); up(&start_stop_sem); return -ENOMEM; @@ -2440,8 +2438,6 @@ static int usbduxsigma_usb_probe(struct usb_interface *uinterf, /* create space for the commands going to the usb device */ usbduxsub[index].dux_commands = kzalloc(SIZEOFDUXBUFFER, GFP_KERNEL); if (!usbduxsub[index].dux_commands) { - dev_err(dev, "comedi_: usbduxsigma: " - "error alloc space for dux commands\n"); tidy_up(&(usbduxsub[index])); up(&start_stop_sem); return -ENOMEM; @@ -2449,8 +2445,6 @@ static int usbduxsigma_usb_probe(struct usb_interface *uinterf, /* create space for the in buffer and set it to zero */ usbduxsub[index].inBuffer = kzalloc(SIZEINBUF, GFP_KERNEL); if (!(usbduxsub[index].inBuffer)) { - dev_err(dev, "comedi_: usbduxsigma: " - "could not alloc space for inBuffer\n"); tidy_up(&(usbduxsub[index])); up(&start_stop_sem); return -ENOMEM; @@ -2458,8 +2452,6 @@ static int usbduxsigma_usb_probe(struct usb_interface *uinterf, /* create space of the instruction buffer */ usbduxsub[index].insnBuffer = kzalloc(SIZEINSNBUF, GFP_KERNEL); if (!(usbduxsub[index].insnBuffer)) { - dev_err(dev, "comedi_: usbduxsigma: " - "could not alloc space for insnBuffer\n"); tidy_up(&(usbduxsub[index])); up(&start_stop_sem); return -ENOMEM; @@ -2467,8 +2459,6 @@ static int usbduxsigma_usb_probe(struct usb_interface *uinterf, /* create space for the outbuffer */ usbduxsub[index].outBuffer = kzalloc(SIZEOUTBUF, GFP_KERNEL); if (!(usbduxsub[index].outBuffer)) { - dev_err(dev, "comedi_: usbduxsigma: " - "could not alloc space for outBuffer\n"); tidy_up(&(usbduxsub[index])); up(&start_stop_sem); return -ENOMEM; @@ -2489,12 +2479,10 @@ static int usbduxsigma_usb_probe(struct usb_interface *uinterf, else usbduxsub[index].numOfInBuffers = NUMOFINBUFFERSFULL; - usbduxsub[index].urbIn = - kzalloc(sizeof(struct urb *) * usbduxsub[index].numOfInBuffers, - GFP_KERNEL); + usbduxsub[index].urbIn = kcalloc(usbduxsub[index].numOfInBuffers, + sizeof(struct urb *), + GFP_KERNEL); if (!(usbduxsub[index].urbIn)) { - dev_err(dev, "comedi_: usbduxsigma: " - "Could not alloc. urbIn array\n"); tidy_up(&(usbduxsub[index])); up(&start_stop_sem); return -ENOMEM; @@ -2519,8 +2507,6 @@ static int usbduxsigma_usb_probe(struct usb_interface *uinterf, usbduxsub[index].urbIn[i]->transfer_buffer = kzalloc(SIZEINBUF, GFP_KERNEL); if (!(usbduxsub[index].urbIn[i]->transfer_buffer)) { - dev_err(dev, "comedi_: usbduxsigma%d: " - "could not alloc. transb.\n", index); tidy_up(&(usbduxsub[index])); up(&start_stop_sem); return -ENOMEM; @@ -2539,12 +2525,9 @@ static int usbduxsigma_usb_probe(struct usb_interface *uinterf, else usbduxsub[index].numOfOutBuffers = NUMOFOUTBUFFERSFULL; - usbduxsub[index].urbOut = - kzalloc(sizeof(struct urb *) * usbduxsub[index].numOfOutBuffers, - GFP_KERNEL); + usbduxsub[index].urbOut = kcalloc(usbduxsub[index].numOfOutBuffers, + sizeof(struct urb *), GFP_KERNEL); if (!(usbduxsub[index].urbOut)) { - dev_err(dev, "comedi_: usbduxsigma: " - "Could not alloc. urbOut array\n"); tidy_up(&(usbduxsub[index])); up(&start_stop_sem); return -ENOMEM; @@ -2569,8 +2552,6 @@ static int usbduxsigma_usb_probe(struct usb_interface *uinterf, usbduxsub[index].urbOut[i]->transfer_buffer = kzalloc(SIZEOUTBUF, GFP_KERNEL); if (!(usbduxsub[index].urbOut[i]->transfer_buffer)) { - dev_err(dev, "comedi_: usbduxsigma%d: " - "could not alloc. transb.\n", index); tidy_up(&(usbduxsub[index])); up(&start_stop_sem); return -ENOMEM; @@ -2606,8 +2587,6 @@ static int usbduxsigma_usb_probe(struct usb_interface *uinterf, usbduxsub[index].urbPwm->transfer_buffer = kzalloc(usbduxsub[index].sizePwmBuf, GFP_KERNEL); if (!(usbduxsub[index].urbPwm->transfer_buffer)) { - dev_err(dev, "comedi_: usbduxsigma%d: " - "could not alloc. transb. for pwm\n", index); tidy_up(&(usbduxsub[index])); up(&start_stop_sem); return -ENOMEM; |