From: Luca Ellero Date: Thu, 10 Jul 2014 09:04:10 +0000 (+0200) Subject: staging: ced1401: fix ced_set_circular() X-Git-Tag: v4.9.8~5976^2~973 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d9b57d9f2843a043b82e69cd3e6bddf39cff21db;p=platform%2Fkernel%2Flinux-rpi3.git staging: ced1401: fix ced_set_circular() Rename camel case arguments and locals in function ced_set_circular() 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 3da24a6..efc1db9 100644 --- a/drivers/staging/ced1401/ced_ioc.c +++ b/drivers/staging/ced1401/ced_ioc.c @@ -1373,29 +1373,32 @@ int ced_dbg_stop_loop(struct ced_data *ced) ** booked and a transfer to that area is in progress. Otherwise, we will ** release the area and re-assign it. ****************************************************************************/ -int ced_set_circular(struct ced_data *ced, struct transfer_area_desc __user *pTD) +int ced_set_circular(struct ced_data *ced, + struct transfer_area_desc __user *utd) { - int iReturn; - bool bToHost; + int ret; + bool to_host; struct transfer_area_desc td; - if (copy_from_user(&td, pTD, sizeof(td))) + if (copy_from_user(&td, utd, sizeof(td))) return -EFAULT; mutex_lock(&ced->io_mutex); dev_dbg(&ced->interface->dev, "%s: area:%d, size:%08x\n", __func__, td.wAreaNum, td.dwLength); - bToHost = td.eSize != 0; /* this is used as the tohost flag */ + to_host = td.eSize != 0; /* this is used as the tohost flag */ - /* The strange cast is done so that we don't get warnings in 32-bit linux about the size of the */ - /* pointer. The pointer is always passed as a 64-bit object so that we don't have problems using */ - /* a 32-bit program on a 64-bit system. unsigned long is 64-bits on a 64-bit system. */ - iReturn = + /* The strange cast is done so that we don't get warnings in 32-bit */ + /* linux about the size of the pointer. The pointer is always passed */ + /* as a 64-bit object so that we don't have problems using a 32-bit */ + /* program on a 64-bit system. unsigned long is 64-bits on a 64-bit */ + /* system. */ + ret = ced_set_area(ced, td.wAreaNum, (char __user *)((unsigned long)td.lpvBuff), td.dwLength, - true, bToHost); + true, to_host); mutex_unlock(&ced->io_mutex); - return iReturn; + return ret; } /**************************************************************************** diff --git a/drivers/staging/ced1401/usb1401.h b/drivers/staging/ced1401/usb1401.h index c04f385..a0d19aa 100644 --- a/drivers/staging/ced1401/usb1401.h +++ b/drivers/staging/ced1401/usb1401.h @@ -251,7 +251,8 @@ 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 *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_set_circular(struct ced_data *ced, + struct transfer_area_desc __user *utd); extern int ced_get_circ_block(struct ced_data *ced, TCIRCBLOCK __user *pCB); extern int ced_free_circ_block(struct ced_data *ced, TCIRCBLOCK __user *pCB); extern int ced_wait_event(struct ced_data *ced, int area, int time_out);