staging: ced1401: fix ced_dbg_ramp_data/addr()
authorLuca Ellero <luca.ellero@brickedbrain.com>
Thu, 10 Jul 2014 09:04:07 +0000 (11:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2014 22:10:06 +0000 (15:10 -0700)
Rename camel case arguments and locals in function ced_dbg_ramp_data() and
ced_dbg_ramp_addr()

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ced1401/ced_ioc.c
drivers/staging/ced1401/usb1401.h

index adab1de869a6758f897961183867075f7a77993c..8c7bfe25ea09d507f28f23c654708bfb9678c34d 100644 (file)
@@ -1256,31 +1256,31 @@ int ced_dbg_poke(struct ced_data *ced, TDBGBLOCK __user *udb)
 ** Execute the diagnostic ramp data operation. Parameters are in the CSBLOCK struct
 ** in order address, default, enable mask, size and repeats.
 ****************************************************************************/
-int ced_dbg_ramp_data(struct ced_data *ced, TDBGBLOCK __user *pDB)
+int ced_dbg_ramp_data(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_SETDEF, db.iDefault);
-       if (iReturn == U14ERR_NOERROR)
-               iReturn = ced_dbg_cmd(ced, DB_SETMASK, db.iMask);
-       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_RAMPD, 0);
+       ret = ced_dbg_cmd(ced, DB_SETADD, db.iAddr);
+       if (ret == U14ERR_NOERROR)
+               ret = ced_dbg_cmd(ced, DB_SETDEF, db.iDefault);
+       if (ret == U14ERR_NOERROR)
+               ret = ced_dbg_cmd(ced, DB_SETMASK, db.iMask);
+       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_RAMPD, 0);
        mutex_unlock(&ced->io_mutex);
 
-       return iReturn;
+       return ret;
 }
 
 /****************************************************************************
@@ -1288,29 +1288,29 @@ int ced_dbg_ramp_data(struct ced_data *ced, TDBGBLOCK __user *pDB)
 **
 ** Execute the diagnostic ramp address operation
 ****************************************************************************/
-int ced_dbg_ramp_addr(struct ced_data *ced, TDBGBLOCK __user *pDB)
+int ced_dbg_ramp_addr(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\n", __func__);
 
-       iReturn = ced_dbg_cmd(ced, DB_SETDEF, db.iDefault);
-       if (iReturn == U14ERR_NOERROR)
-               iReturn = ced_dbg_cmd(ced, DB_SETMASK, db.iMask);
-       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_RAMPA, 0);
+       ret = ced_dbg_cmd(ced, DB_SETDEF, db.iDefault);
+       if (ret == U14ERR_NOERROR)
+               ret = ced_dbg_cmd(ced, DB_SETMASK, db.iMask);
+       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_RAMPA, 0);
        mutex_unlock(&ced->io_mutex);
 
-       return iReturn;
+       return ret;
 }
 
 /****************************************************************************
index 2e3a1c6e22ca0ba21ffa0a4586ee2671b8c9f3e5..77d861487e137b00f19072a8dfe534adf1291ddf 100644 (file)
@@ -247,8 +247,8 @@ 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 *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_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_stop_loop(struct ced_data *ced);
 extern int ced_set_circular(struct ced_data *ced, struct transfer_area_desc __user *pTD);