[PATCH 106/115] staging: ced1401: fix ced_dbg_get_data()

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

 



Rename camel case arguments and locals in function ced_dbg_get_data()

Signed-off-by: Luca Ellero <luca.ellero@xxxxxxxxxxxxxxxx>
---
 drivers/staging/ced1401/ced_ioc.c |   19 ++++++++++---------
 drivers/staging/ced1401/usb1401.h |    2 +-
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c
index 456747c..39b1bbf 100644
--- a/drivers/staging/ced1401/ced_ioc.c
+++ b/drivers/staging/ced1401/ced_ioc.c
@@ -1318,31 +1318,32 @@ int ced_dbg_ramp_addr(struct ced_data *ced, TDBGBLOCK __user *udb)
 **
 ** Retrieve the data resulting from the last debug Peek operation
 ****************************************************************************/
-int ced_dbg_get_data(struct ced_data *ced, TDBGBLOCK __user *pDB)
+int ced_dbg_get_data(struct ced_data *ced, TDBGBLOCK __user *udb)
 {
-	int iReturn;
+	int ret;
 	TDBGBLOCK db;
+
 	memset(&db, 0, sizeof(db));	/*  fill returned block with 0s */
 
 	mutex_lock(&ced->io_mutex);
 	dev_dbg(&ced->interface->dev, "%s\n", __func__);
 
 	/*  Read back the last peeked value from the 1401. */
-	iReturn = usb_control_msg(ced->udev, usb_rcvctrlpipe(ced->udev, 0),
+	ret = usb_control_msg(ced->udev, usb_rcvctrlpipe(ced->udev, 0),
 				  DB_DATA, (D_TO_H | VENDOR | DEVREQ), 0, 0,
 				  &db.iData, sizeof(db.iData), HZ);
-	if (iReturn == sizeof(db.iData)) {
-		if (copy_to_user(pDB, &db, sizeof(db)))
-			iReturn = -EFAULT;
+	if (ret == sizeof(db.iData)) {
+		if (copy_to_user(udb, &db, sizeof(db)))
+			ret = -EFAULT;
 		else
-			iReturn = U14ERR_NOERROR;
+			ret = U14ERR_NOERROR;
 	} else
 		dev_err(&ced->interface->dev, "%s: failed, code %d\n",
-			__func__, iReturn);
+			__func__, ret);
 
 	mutex_unlock(&ced->io_mutex);
 
-	return iReturn;
+	return ret;
 }
 
 /****************************************************************************
diff --git a/drivers/staging/ced1401/usb1401.h b/drivers/staging/ced1401/usb1401.h
index b3950d1..5d7a9063 100644
--- a/drivers/staging/ced1401/usb1401.h
+++ b/drivers/staging/ced1401/usb1401.h
@@ -249,7 +249,7 @@ extern int ced_dbg_peek(struct ced_data *ced, TDBGBLOCK __user *udb);
 extern int ced_dbg_poke(struct ced_data *ced, TDBGBLOCK __user *udb);
 extern int ced_dbg_ramp_data(struct ced_data *ced, TDBGBLOCK __user *udb);
 extern int ced_dbg_ramp_addr(struct ced_data *ced, TDBGBLOCK __user *udb);
-extern int ced_dbg_get_data(struct ced_data *ced, TDBGBLOCK __user *pDB);
+extern int ced_dbg_get_data(struct ced_data *ced, TDBGBLOCK __user *udb);
 extern int ced_dbg_stop_loop(struct ced_data *ced);
 extern int ced_set_circular(struct ced_data *ced, struct transfer_area_desc __user *pTD);
 extern int ced_get_circ_block(struct ced_data *ced, TCIRCBLOCK __user *pCB);
-- 
1.7.10.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-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