]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ath9k: ar9271_hw_pa_cal: use REG_READ_ARRAY
authorOleksij Rempel <linux@rempel-privat.de>
Sun, 22 Mar 2015 18:29:52 +0000 (19:29 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 30 Mar 2015 08:31:30 +0000 (11:31 +0300)
insted of reading each register separatly
and waste 4ms on each operation, we can
use one shot read.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath9k/ar9002_calib.c

index 62a23149556d178291cd0c30a5946a30c8b4ac02..50fcd343c41af12d865d55f1ceb5427797bd20d7 100644 (file)
@@ -440,8 +440,7 @@ static void ar9271_hw_pa_cal(struct ath_hw *ah, bool is_reset)
                { AR9285_AN_RF2G3, 0 },
        };
 
-       for (i = 0; i < ARRAY_SIZE(regList); i++)
-               regList[i][1] = REG_READ(ah, regList[i][0]);
+       REG_READ_ARRAY(ah, regList, ARRAY_SIZE(regList));
 
        ENABLE_REG_RMW_BUFFER(ah);
        /* 7834, b1=0 */