Jelajahi Sumber

staging: ced1401: fix ced_dbg_peek/poke()

Rename camel case arguments and locals in function ced_dbg_peek() and
ced_dbg_poke()

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luca Ellero 11 tahun lalu
induk
melakukan
a81bd28664
2 mengubah file dengan 24 tambahan dan 24 penghapusan
  1. 22 22
      drivers/staging/ced1401/ced_ioc.c
  2. 2 2
      drivers/staging/ced1401/usb1401.h

+ 22 - 22
drivers/staging/ced1401/ced_ioc.c

@@ -1198,27 +1198,27 @@ static int ced_dbg_cmd(struct ced_data *ced, unsigned char cmd,
 **
 ** Execute the diagnostic peek operation. Uses address, width and repeats.
 ****************************************************************************/
-int ced_dbg_peek(struct ced_data *ced, TDBGBLOCK __user *pDB)
+int ced_dbg_peek(struct ced_data *ced, TDBGBLOCK __user *udb)
 {
-	int iReturn;
+	int ret;
 	TDBGBLOCK db;
 
-	if (copy_from_user(&db, pDB, sizeof(db)))
+	if (copy_from_user(&db, udb, sizeof(db)))
 		return -EFAULT;
 
 	mutex_lock(&ced->io_mutex);
 	dev_dbg(&ced->interface->dev, "%s: @ %08x\n", __func__, db.iAddr);
 
-	iReturn = ced_dbg_cmd(ced, DB_SETADD, db.iAddr);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_WIDTH, db.iWidth);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_REPEATS, db.iRepeats);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_PEEK, 0);
+	ret = ced_dbg_cmd(ced, DB_SETADD, db.iAddr);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_WIDTH, db.iWidth);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_REPEATS, db.iRepeats);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_PEEK, 0);
 	mutex_unlock(&ced->io_mutex);
 
-	return iReturn;
+	return ret;
 }
 
 /****************************************************************************
@@ -1227,27 +1227,27 @@ int ced_dbg_peek(struct ced_data *ced, TDBGBLOCK __user *pDB)
 ** Execute the diagnostic poke operation. Parameters are in the CSBLOCK struct
 ** in order address, size, repeats and value to poke.
 ****************************************************************************/
-int ced_dbg_poke(struct ced_data *ced, TDBGBLOCK __user *pDB)
+int ced_dbg_poke(struct ced_data *ced, TDBGBLOCK __user *udb)
 {
-	int iReturn;
+	int ret;
 	TDBGBLOCK db;
 
-	if (copy_from_user(&db, pDB, sizeof(db)))
+	if (copy_from_user(&db, udb, sizeof(db)))
 		return -EFAULT;
 
 	mutex_lock(&ced->io_mutex);
 	dev_dbg(&ced->interface->dev, "%s: @ %08x\n", __func__, db.iAddr);
 
-	iReturn = ced_dbg_cmd(ced, DB_SETADD, db.iAddr);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_WIDTH, db.iWidth);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_REPEATS, db.iRepeats);
-	if (iReturn == U14ERR_NOERROR)
-		iReturn = ced_dbg_cmd(ced, DB_POKE, db.iData);
+	ret = ced_dbg_cmd(ced, DB_SETADD, db.iAddr);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_WIDTH, db.iWidth);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_REPEATS, db.iRepeats);
+	if (ret == U14ERR_NOERROR)
+		ret = ced_dbg_cmd(ced, DB_POKE, db.iData);
 	mutex_unlock(&ced->io_mutex);
 
-	return iReturn;
+	return ret;
 }
 
 /****************************************************************************

+ 2 - 2
drivers/staging/ced1401/usb1401.h

@@ -245,8 +245,8 @@ extern int ced_check_self_test(struct ced_data *ced,
 			       TGET_SELFTEST __user *ugst);
 extern int ced_type_of_1401(struct ced_data *ced);
 extern int ced_transfer_flags(struct ced_data *ced);
-extern int ced_dbg_peek(struct ced_data *ced, TDBGBLOCK __user *pDB);
-extern int ced_dbg_poke(struct ced_data *ced, TDBGBLOCK __user *pDB);
+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 *pDB);
 extern int ced_dbg_ramp_addr(struct ced_data *ced, TDBGBLOCK __user *pDB);
 extern int ced_dbg_get_data(struct ced_data *ced, TDBGBLOCK __user *pDB);