Commit 423e118c authored by Davis Abubakr-Sadik Nii Nai's avatar Davis Abubakr-Sadik Nii Nai Committed by Greg Kroah-Hartman

Staging: csr: fix indentation style issue in bh.c

This is a patch to the bh.c file that fixes up all indentation errors
found the checkpatch.pl tool. Two lines beyond 80 characters are left
alone to improve readability
Signed-off-by: default avatarDavis Abubakr-Sadik Nii Nai <dwa2pac@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 78a650dc
......@@ -242,13 +242,17 @@ static int bh_thread_function(void *arg)
t = timeout = 0;
while (!kthread_should_stop()) {
/* wait until an error occurs, or we need to process something. */
/*
* wait until an error occurs,
* or we need to process something.
*/
unifi_trace(priv, UDBG3, "bh_thread goes to sleep.\n");
if (timeout > 0) {
/* Convert t in ms to jiffies */
t = msecs_to_jiffies(timeout);
ret = wait_event_interruptible_timeout(this_thread->wakeup_q,
ret = wait_event_interruptible_timeout(
this_thread->wakeup_q,
(this_thread->wakeup_flag && !this_thread->block_thread) ||
kthread_should_stop(),
t);
......@@ -260,7 +264,8 @@ static int bh_thread_function(void *arg)
}
if (kthread_should_stop()) {
unifi_trace(priv, UDBG2, "bh_thread: signalled to exit\n");
unifi_trace(priv, UDBG2,
"bh_thread: signalled to exit\n");
break;
}
......@@ -278,7 +283,7 @@ static int bh_thread_function(void *arg)
CsrSdioClaim(priv->sdio);
csrResult = unifi_bh(priv->card, &timeout);
if(csrResult != CSR_RESULT_SUCCESS) {
if (csrResult != CSR_RESULT_SUCCESS) {
if (csrResult == CSR_WIFI_HIP_RESULT_NO_DEVICE) {
CsrSdioRelease(priv->sdio);
uf_wait_for_thread_to_stop(priv, this_thread);
......@@ -319,7 +324,7 @@ static int bh_thread_function(void *arg)
* 0 on success or else a Linux error code.
* ---------------------------------------------------------------------------
*/
int
int
uf_init_bh(unifi_priv_t *priv)
{
int r;
......@@ -374,16 +379,18 @@ CsrResult unifi_run_bh(void *ospriv)
/*
* If an error has occurred, we discard silently all messages from the bh
* until the error has been processed and the unifi has been reinitialised.
* until the error has been processed and the unifi has been
* reinitialised.
*/
if (priv->bh_thread.block_thread == 1) {
unifi_trace(priv, UDBG3, "unifi_run_bh: discard message.\n");
/*
* Do not try to acknowledge a pending interrupt here.
* This function is called by unifi_send_signal() which in turn can be
* running in an atomic or 'disabled irq' level if a signal is sent
* from a workqueue task (i.e multicass addresses set).
* We can not hold the SDIO lock because it might sleep.
* This function is called by unifi_send_signal()
* which in turn can be running in an atomic or 'disabled irq'
* level if a signal is sent from a workqueue task
* (i.e multicass addresses set). We can not hold the SDIO lock
* because it might sleep.
*/
return CSR_RESULT_FAILURE;
}
......
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