From a81bd28664be1ea62978f314331296af612a1216 Mon Sep 17 00:00:00 2001 From: Luca Ellero Date: Thu, 10 Jul 2014 11:04:06 +0200 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ced1401/ced_ioc.c | 44 +++++++++++++++++++-------------------- drivers/staging/ced1401/usb1401.h | 4 ++-- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c index 46cc293..adab1de 100644 --- a/drivers/staging/ced1401/ced_ioc.c +++ b/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; } /**************************************************************************** diff --git a/drivers/staging/ced1401/usb1401.h b/drivers/staging/ced1401/usb1401.h index e1f1c54..2e3a1c6 100644 --- a/drivers/staging/ced1401/usb1401.h +++ b/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); -- 2.7.4