[PATCH 6/9] staging: ks7010: Refactor code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Code may be refactored to take advantage of previous commit.

Refactor code. Introduce four new line over 80 warnings. Make code
more legible.

Signed-off-by: Tobin C. Harding <me@xxxxxxxx>
---
 drivers/staging/ks7010/ks7010_sdio.c | 31 +++++++++----------------------
 1 file changed, 9 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 29d332d..4842b2d 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -196,40 +196,27 @@ static int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
 		if (!atomic_read(&priv->psstatus.confirm_wait)
 			&& !atomic_read(&priv->psstatus.snooze_guard)
 			&& !cnt_txqbody(priv)) {
-			ret =
-				ks7010_sdio_read(priv, INT_PENDING,
-						&rw_data,
-						sizeof(rw_data));
+			ret = ks7010_sdio_read(priv, INT_PENDING, &rw_data,
+					       sizeof(rw_data));
 			if (ret) {
-				DPRINTK(1,
-					" error : INT_PENDING=%02X\n",
-					rw_data);
+				DPRINTK(1, " error : INT_PENDING=%02X\n", rw_data);
 				queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
 						&priv->ks_wlan_hw.rw_wq, 1);
 				break;
 			}
 			if (!rw_data) {
 				rw_data = GCR_B_DOZE;
-				ret =
-					ks7010_sdio_write(priv,
-							GCR_B,
-							&rw_data,
+				ret = ks7010_sdio_write(priv, GCR_B, &rw_data,
 							sizeof(rw_data));
 				if (ret) {
-					DPRINTK(1,
-						" error : GCR_B=%02X\n",
-						rw_data);
-					queue_delayed_work
-						(priv->ks_wlan_hw.ks7010sdio_wq,
-							&priv->ks_wlan_hw.rw_wq, 1);
+					DPRINTK(1, " error : GCR_B=%02X\n", rw_data);
+					queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
+							   &priv->ks_wlan_hw.rw_wq, 1);
 					break;
 				}
-				DPRINTK(4,
-					"PMG SET!! : GCR_B=%02X\n",
-					rw_data);
+				DPRINTK(4, "PMG SET!! : GCR_B=%02X\n", rw_data);
 				atomic_set(&priv->psstatus.status, PS_SNOOZE);
-				DPRINTK(3,
-					"psstatus.status=PS_SNOOZE\n");
+				DPRINTK(3, "psstatus.status=PS_SNOOZE\n");
 			} else {
 				queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
 						&priv->ks_wlan_hw.rw_wq, 1);
-- 
2.7.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux