From: Luca Ellero Date: Thu, 10 Jul 2014 09:04:08 +0000 (+0200) Subject: staging: ced1401: fix ced_dbg_get_data() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f1d513bbb9b0a6629a6b115b97348d0ef7395e4e;p=linux-beck.git staging: ced1401: fix ced_dbg_get_data() Rename camel case arguments and locals in function ced_dbg_get_data() Signed-off-by: Luca Ellero Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c index 8c7bfe25ea09..682da273726f 100644 --- a/drivers/staging/ced1401/ced_ioc.c +++ b/drivers/staging/ced1401/ced_ioc.c @@ -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; } /**************************************************************************** diff --git a/drivers/staging/ced1401/usb1401.h b/drivers/staging/ced1401/usb1401.h index 77d861487e13..c04f3857e134 100644 --- a/drivers/staging/ced1401/usb1401.h +++ b/drivers/staging/ced1401/usb1401.h @@ -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);