[RFC PATCH 25/39] staging: comedi: usbduxfast: rename 'transfer_buffer' in private data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For aesthetic reasons, rename this variable to 'inbuf' to match the
define used for its size (SIZEINBUF).

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/usbduxfast.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c
index ec1cf1c..65a2168 100644
--- a/drivers/staging/comedi/drivers/usbduxfast.c
+++ b/drivers/staging/comedi/drivers/usbduxfast.c
@@ -152,7 +152,7 @@ static const struct comedi_lrange range_usbduxfast_ai_range = {
  */
 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 */
@@ -458,7 +458,7 @@ static int usbduxfastsub_submit_InURBs(struct comedi_device *dev)
 		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);
@@ -1132,7 +1132,7 @@ static int usbduxfast_ai_insn_read(struct comedi_device *dev,
 
 	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");
@@ -1143,7 +1143,7 @@ static int usbduxfast_ai_insn_read(struct comedi_device *dev,
 	/* 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);
@@ -1157,7 +1157,7 @@ static int usbduxfast_ai_insn_read(struct comedi_device *dev,
 			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++;
 		}
 	}
@@ -1301,8 +1301,8 @@ static int usbduxfast_auto_attach(struct comedi_device *dev,
 		return -ENOMEM;
 	}
 
-	devpriv->transfer_buffer = kmalloc(SIZEINBUF, GFP_KERNEL);
-	if (!devpriv->transfer_buffer)
+	devpriv->inbuf = kmalloc(SIZEINBUF, GFP_KERNEL);
+	if (!devpriv->inbuf)
 		return -ENOMEM;
 
 	/*
@@ -1335,8 +1335,8 @@ static void usbduxfast_detach(struct comedi_device *dev)
 		/* 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;
-- 
1.8.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux