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

staging: ced1401: fix ced_test_event()

Rename camel case arguments and locals in function ced_test_event()
Signed-off-by: default avatarLuca Ellero <luca.ellero@brickedbrain.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3fe68ea0
...@@ -916,21 +916,23 @@ int ced_wait_event(struct ced_data *ced, int area, int time_out) ...@@ -916,21 +916,23 @@ int ced_wait_event(struct ced_data *ced, int area, int time_out)
** number of times a block completed since the last call, or 0 if none or a ** number of times a block completed since the last call, or 0 if none or a
** negative error. ** negative error.
****************************************************************************/ ****************************************************************************/
int ced_test_event(struct ced_data *ced, int nArea) int ced_test_event(struct ced_data *ced, int area)
{ {
int iReturn; int ret;
if ((unsigned)nArea >= MAX_TRANSAREAS) if ((unsigned)area >= MAX_TRANSAREAS)
iReturn = U14ERR_BADAREA; ret = U14ERR_BADAREA;
else { else {
struct transarea *pTA = &ced->trans_def[nArea]; struct transarea *ta = &ced->trans_def[area];
mutex_lock(&ced->io_mutex); /* make sure we have no competitor */
/* make sure we have no competitor */
mutex_lock(&ced->io_mutex);
spin_lock_irq(&ced->staged_lock); spin_lock_irq(&ced->staged_lock);
iReturn = pTA->wake_up; /* get wakeup count since last call */ ret = ta->wake_up; /* get wakeup count since last call */
pTA->wake_up = 0; /* clear the count */ ta->wake_up = 0; /* clear the count */
spin_unlock_irq(&ced->staged_lock); spin_unlock_irq(&ced->staged_lock);
mutex_unlock(&ced->io_mutex); mutex_unlock(&ced->io_mutex);
} }
return iReturn; return ret;
} }
/**************************************************************************** /****************************************************************************
......
...@@ -253,6 +253,6 @@ extern int ced_dbg_stop_loop(struct ced_data *ced); ...@@ -253,6 +253,6 @@ 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 *pTD);
extern int ced_get_circ_block(struct ced_data *ced, TCIRCBLOCK __user *pCB); 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_free_circ_block(struct ced_data *ced, TCIRCBLOCK __user *pCB);
extern int ced_test_event(struct ced_data *ced, int nArea);
extern int ced_wait_event(struct ced_data *ced, int area, int time_out); extern int ced_wait_event(struct ced_data *ced, int area, int time_out);
extern int ced_test_event(struct ced_data *ced, int area);
#endif #endif
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