From patchwork Sun Mar 22 18:29:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 6067131 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 5F3A59F350 for ; Sun, 22 Mar 2015 18:31:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7C72120221 for ; Sun, 22 Mar 2015 18:31:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0D3020220 for ; Sun, 22 Mar 2015 18:31:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751882AbbCVSbm (ORCPT ); Sun, 22 Mar 2015 14:31:42 -0400 Received: from mout.gmx.net ([212.227.15.15]:62285 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751880AbbCVSbl (ORCPT ); Sun, 22 Mar 2015 14:31:41 -0400 Received: from localhost.localdomain ([80.187.100.161]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LgHvY-1ZLF2U1siy-00ninP; Sun, 22 Mar 2015 19:31:38 +0100 From: Oleksij Rempel To: linux-wireless@vger.kernel.org, kvalo@codeaurora.org, ath9k-devel@lists.ath9k.org Cc: Oleksij Rempel Subject: [PATCH v3 07/18] ath9k: ar9271_hw_pa_cal: use REG_READ_ARRAY Date: Sun, 22 Mar 2015 19:29:52 +0100 Message-Id: <1427049003-8443-8-git-send-email-linux@rempel-privat.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427049003-8443-1-git-send-email-linux@rempel-privat.de> References: <1427049003-8443-1-git-send-email-linux@rempel-privat.de> X-Provags-ID: V03:K0:0brAjOzgd2Nx5Gn9DB952pO71VHAQlfO9fDjpLHMAcRf3MQODt0 0WqKGNk80p4mrobE+bZV4eK6RR+GEQwNjqjTK7t0K1aRwauVNTVx3qn20TGzIcTyjoKIrnV aKw8B8ei339UqKWnjc9SUzUVbg8Ub9uzH8nTX0IEaEvGOx7J9H19MHLrDFbtRFk64Z6szuF MgD7RW8fsD6irq25/+WxA== 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 */