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

staging: ced1401: fix ced_dbg_get_data()

Rename camel case arguments and locals in function ced_dbg_get_data()
Signed-off-by: default avatarLuca Ellero <luca.ellero@brickedbrain.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3e064a1f
......@@ -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;
}
/****************************************************************************
......
......@@ -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);
......
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