Commit a81bd286 authored by Luca Ellero's avatar Luca Ellero Committed by Greg Kroah-Hartman

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: default avatarLuca Ellero <luca.ellero@brickedbrain.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 02f1d35c
...@@ -1198,27 +1198,27 @@ static int ced_dbg_cmd(struct ced_data *ced, unsigned char cmd, ...@@ -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. ** 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; TDBGBLOCK db;
if (copy_from_user(&db, pDB, sizeof(db))) if (copy_from_user(&db, udb, sizeof(db)))
return -EFAULT; return -EFAULT;
mutex_lock(&ced->io_mutex); mutex_lock(&ced->io_mutex);
dev_dbg(&ced->interface->dev, "%s: @ %08x\n", __func__, db.iAddr); dev_dbg(&ced->interface->dev, "%s: @ %08x\n", __func__, db.iAddr);
iReturn = ced_dbg_cmd(ced, DB_SETADD, db.iAddr); ret = ced_dbg_cmd(ced, DB_SETADD, db.iAddr);
if (iReturn == U14ERR_NOERROR) if (ret == U14ERR_NOERROR)
iReturn = ced_dbg_cmd(ced, DB_WIDTH, db.iWidth); ret = ced_dbg_cmd(ced, DB_WIDTH, db.iWidth);
if (iReturn == U14ERR_NOERROR) if (ret == U14ERR_NOERROR)
iReturn = ced_dbg_cmd(ced, DB_REPEATS, db.iRepeats); ret = ced_dbg_cmd(ced, DB_REPEATS, db.iRepeats);
if (iReturn == U14ERR_NOERROR) if (ret == U14ERR_NOERROR)
iReturn = ced_dbg_cmd(ced, DB_PEEK, 0); ret = ced_dbg_cmd(ced, DB_PEEK, 0);
mutex_unlock(&ced->io_mutex); mutex_unlock(&ced->io_mutex);
return iReturn; return ret;
} }
/**************************************************************************** /****************************************************************************
...@@ -1227,27 +1227,27 @@ int ced_dbg_peek(struct ced_data *ced, TDBGBLOCK __user *pDB) ...@@ -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 ** Execute the diagnostic poke operation. Parameters are in the CSBLOCK struct
** in order address, size, repeats and value to poke. ** 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; TDBGBLOCK db;
if (copy_from_user(&db, pDB, sizeof(db))) if (copy_from_user(&db, udb, sizeof(db)))
return -EFAULT; return -EFAULT;
mutex_lock(&ced->io_mutex); mutex_lock(&ced->io_mutex);
dev_dbg(&ced->interface->dev, "%s: @ %08x\n", __func__, db.iAddr); dev_dbg(&ced->interface->dev, "%s: @ %08x\n", __func__, db.iAddr);
iReturn = ced_dbg_cmd(ced, DB_SETADD, db.iAddr); ret = ced_dbg_cmd(ced, DB_SETADD, db.iAddr);
if (iReturn == U14ERR_NOERROR) if (ret == U14ERR_NOERROR)
iReturn = ced_dbg_cmd(ced, DB_WIDTH, db.iWidth); ret = ced_dbg_cmd(ced, DB_WIDTH, db.iWidth);
if (iReturn == U14ERR_NOERROR) if (ret == U14ERR_NOERROR)
iReturn = ced_dbg_cmd(ced, DB_REPEATS, db.iRepeats); ret = ced_dbg_cmd(ced, DB_REPEATS, db.iRepeats);
if (iReturn == U14ERR_NOERROR) if (ret == U14ERR_NOERROR)
iReturn = ced_dbg_cmd(ced, DB_POKE, db.iData); ret = ced_dbg_cmd(ced, DB_POKE, db.iData);
mutex_unlock(&ced->io_mutex); mutex_unlock(&ced->io_mutex);
return iReturn; return ret;
} }
/**************************************************************************** /****************************************************************************
......
...@@ -245,8 +245,8 @@ extern int ced_check_self_test(struct ced_data *ced, ...@@ -245,8 +245,8 @@ extern int ced_check_self_test(struct ced_data *ced,
TGET_SELFTEST __user *ugst); TGET_SELFTEST __user *ugst);
extern int ced_type_of_1401(struct ced_data *ced); extern int ced_type_of_1401(struct ced_data *ced);
extern int ced_transfer_flags(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_peek(struct ced_data *ced, TDBGBLOCK __user *udb);
extern int ced_dbg_poke(struct ced_data *ced, TDBGBLOCK __user *pDB); 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_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_addr(struct ced_data *ced, TDBGBLOCK __user *pDB);
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 *pDB);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment