*/
struct usbduxfast_private {
struct urb *urb; /* BULK-transfer handling: urb */
- int8_t *transfer_buffer;
+ int8_t *inbuf;
short int ai_cmd_running; /* asynchronous command is running */
short int ai_continous; /* continous acquisition */
long int ai_sample_count; /* number of samples to acquire */
return -EFAULT;
usb_fill_bulk_urb(devpriv->urb, usb, usb_rcvbulkpipe(usb, BULKINEP),
- devpriv->transfer_buffer, SIZEINBUF,
+ devpriv->inbuf, SIZEINBUF,
usbduxfast_ai_interrupt, dev);
ret = usb_submit_urb(devpriv->urb, GFP_ATOMIC);
for (i = 0; i < PACKETS_TO_IGNORE; i++) {
err = usb_bulk_msg(usb, usb_rcvbulkpipe(usb, BULKINEP),
- devpriv->transfer_buffer, SIZEINBUF,
+ devpriv->inbuf, SIZEINBUF,
&actual_length, 10000);
if (err < 0) {
dev_err(dev->class_dev, "insn timeout, no data\n");
/* data points */
for (i = 0; i < insn->n;) {
err = usb_bulk_msg(usb, usb_rcvbulkpipe(usb, BULKINEP),
- devpriv->transfer_buffer, SIZEINBUF,
+ devpriv->inbuf, SIZEINBUF,
&actual_length, 10000);
if (err < 0) {
dev_err(dev->class_dev, "insn data error: %d\n", err);
return -EINVAL;
}
for (j = chan; (j < n) && (i < insn->n); j = j + 16) {
- data[i] = ((uint16_t *) (devpriv->transfer_buffer))[j];
+ data[i] = ((uint16_t *) (devpriv->inbuf))[j];
i++;
}
}
return -ENOMEM;
}
- devpriv->transfer_buffer = kmalloc(SIZEINBUF, GFP_KERNEL);
- if (!devpriv->transfer_buffer)
+ devpriv->inbuf = kmalloc(SIZEINBUF, GFP_KERNEL);
+ if (!devpriv->inbuf)
return -ENOMEM;
/*
/* waits until a running transfer is over */
usb_kill_urb(devpriv->urb);
- kfree(devpriv->transfer_buffer);
- devpriv->transfer_buffer = NULL;
+ kfree(devpriv->inbuf);
+ devpriv->inbuf = NULL;
usb_free_urb(devpriv->urb);
devpriv->urb = NULL;