mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
staging: ced1401: fix ced_dbg_get_data()
Rename camel case arguments and locals in function ced_dbg_get_data() Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3e064a1ffc
commit
f1d513bbb9
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user