Commit dad5980e authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman

staging: ks7010: refactor function call parameters

Function call parameters are split over more lines than
necessary. Also assignment statements are split after the '=' sign.
This adds extra lines to the function and may also reduces
readability.

Refactor function call parameters and reduce the number of lines
used. Put assignment statements onto single line.
Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3188bc09
...@@ -195,48 +195,34 @@ static int _ks_wlan_hw_power_save(struct ks_wlan_private *priv) ...@@ -195,48 +195,34 @@ static int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
if (!atomic_read(&priv->psstatus.confirm_wait) && if (!atomic_read(&priv->psstatus.confirm_wait) &&
!atomic_read(&priv->psstatus.snooze_guard) && !atomic_read(&priv->psstatus.snooze_guard) &&
!cnt_txqbody(priv)) { !cnt_txqbody(priv)) {
retval = retval = ks7010_sdio_read(priv, INT_PENDING, &rw_data,
ks7010_sdio_read(priv, INT_PENDING,
&rw_data,
sizeof(rw_data)); sizeof(rw_data));
if (retval) { if (retval) {
DPRINTK(1, DPRINTK(1, " error : INT_PENDING=%02X\n", rw_data);
" error : INT_PENDING=%02X\n",
rw_data);
queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq, queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
&priv->ks_wlan_hw.rw_wq, 1); &priv->ks_wlan_hw.rw_wq, 1);
return 0; return 0;
} }
if (!rw_data) { if (!rw_data) {
rw_data = GCR_B_DOZE; rw_data = GCR_B_DOZE;
retval = retval = ks7010_sdio_write(priv, GCR_B, &rw_data,
ks7010_sdio_write(priv,
GCR_B,
&rw_data,
sizeof(rw_data)); sizeof(rw_data));
if (retval) { if (retval) {
DPRINTK(1, DPRINTK(1, " error : GCR_B=%02X\n", rw_data);
" error : GCR_B=%02X\n", queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
rw_data);
queue_delayed_work
(priv->ks_wlan_hw.ks7010sdio_wq,
&priv->ks_wlan_hw.rw_wq, 1); &priv->ks_wlan_hw.rw_wq, 1);
return 0; return 0;
} }
DPRINTK(4, DPRINTK(4, "PMG SET!! : GCR_B=%02X\n", rw_data);
"PMG SET!! : GCR_B=%02X\n",
rw_data);
atomic_set(&priv->psstatus.status, PS_SNOOZE); atomic_set(&priv->psstatus.status, PS_SNOOZE);
DPRINTK(3, DPRINTK(3, "psstatus.status=PS_SNOOZE\n");
"psstatus.status=PS_SNOOZE\n");
} else { } else {
queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq, queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
&priv->ks_wlan_hw.rw_wq, 1); &priv->ks_wlan_hw.rw_wq, 1);
} }
} else { } else {
queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq, queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
&priv->ks_wlan_hw.rw_wq, &priv->ks_wlan_hw.rw_wq, 0);
0);
} }
return 0; return 0;
......
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