From patchwork Sat Mar 21 08:47:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 6063681 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BC39A9F314 for ; Sat, 21 Mar 2015 08:47:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E8026202E6 for ; Sat, 21 Mar 2015 08:47:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 224A02026F for ; Sat, 21 Mar 2015 08:47:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751479AbbCUIrm (ORCPT ); Sat, 21 Mar 2015 04:47:42 -0400 Received: from mout.gmx.net ([212.227.15.18]:64229 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751294AbbCUIrg (ORCPT ); Sat, 21 Mar 2015 04:47:36 -0400 Received: from ultralex.Speedport_W_724V_09011602_00_015 ([79.222.207.80]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MD9q8-1Yj6QS3dFM-00Gazy; Sat, 21 Mar 2015 09:47:32 +0100 From: Oleksij Rempel To: linux-wireless@vger.kernel.org, kvalo@codeaurora.org, ath9k-devel@lists.ath9k.org Cc: Oleksij Rempel Subject: [PATCH v2 07/18] ath9k: ar9271_hw_pa_cal: use REG_READ_ARRAY Date: Sat, 21 Mar 2015 09:47:10 +0100 Message-Id: <1426927641-18474-8-git-send-email-linux@rempel-privat.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426927641-18474-1-git-send-email-linux@rempel-privat.de> References: <1426927641-18474-1-git-send-email-linux@rempel-privat.de> X-Provags-ID: V03:K0:iPeIyyIny73s1lZJ3qgaOWXV/iPuoWtyqlKiPqW6iWPSQHPjzkp x4rvLAzs22io9q/N4DSw86WbWb4a672Rd+q4qC848bucGrMCXl+OHe+wwOwPLzGOJpQBDx9 k5joNG/2WwHfpYuC7WIu5el/c7LJL9Gh56bKcEnSXWe/iNAbwHgnUAN0UPrKZImrLvKa7ro O3tJvMqbNr336hoWu+2pg== X-UI-Out-Filterresults: notjunk:1; Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP insted of reading each register separatly and waste 4ms on each operation, we can use one shot read. Signed-off-by: Oleksij Rempel --- drivers/net/wireless/ath/ath9k/ar9002_calib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/drivers/net/wireless/ath/ath9k/ar9002_calib.c index 62a2314..50fcd34 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c @@ -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 */