From patchwork Sun Sep 14 19:33:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Ryazanov X-Patchwork-Id: 4902191 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 428DF9F2EC for ; Sun, 14 Sep 2014 19:28:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F0774201DE for ; Sun, 14 Sep 2014 19:32:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 878E5201C0 for ; Sun, 14 Sep 2014 19:32:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752748AbaINTcI (ORCPT ); Sun, 14 Sep 2014 15:32:08 -0400 Received: from mail-la0-f49.google.com ([209.85.215.49]:64977 "EHLO mail-la0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752652AbaINTcH (ORCPT ); Sun, 14 Sep 2014 15:32:07 -0400 Received: by mail-la0-f49.google.com with SMTP id pv20so3501294lab.22 for ; Sun, 14 Sep 2014 12:32:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=O1gdMNvjWBXin9BSXXVrc9VnnvaXt9Ucv54lTDilRqA=; b=VKDlQT8jbggjdDW75++uZAjn6X516Ag75x5wuPmUE4VmKYqc+aiVTvvzu3DCW3bbSj 4I5MW1PPnTuIB7UPjthbnh7WMv3lx1ibHA0wCI7iley+SAsX0dotLb8Xqnu6Nfhh2cST wiEn27iQRMNpJMkvnKd/KTeUcceXujeIA0d+fb4PoQXCp+i3OXNqkITFfVp58uoOFxpN E3ynDur/HLkWATO+tdTLcTJI2tTxbk9IDpNljvmG6lPl1WAqmTeElVzqDgVJhisBzHIx 6eZWjg6SaRorCjMm7dJ8titUhZu7Cp9w9iaX/g7mXFg6FtuzBctAOKSIrM7xvcL309QO V5xQ== X-Received: by 10.112.98.140 with SMTP id ei12mr22309688lbb.6.1410723125736; Sun, 14 Sep 2014 12:32:05 -0700 (PDT) Received: from rsa-laptop.internal.lan ([217.25.229.52]) by mx.google.com with ESMTPSA id y5sm3339621laa.20.2014.09.14.12.32.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Sep 2014 12:32:04 -0700 (PDT) From: Sergey Ryazanov To: Ralf Baechle Cc: Linux MIPS , Jiri Slaby , Nick Kossifidis , "Luis R. Rodriguez" , linux-wireless@vger.kernel.org, ath5k-devel@lists.ath5k.org Subject: [RFC 16/18] ath5k: correct conditional compilation Date: Sun, 14 Sep 2014 23:33:31 +0400 Message-Id: <1410723213-22440-17-git-send-email-ryazanov.s.a@gmail.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1410723213-22440-1-git-send-email-ryazanov.s.a@gmail.com> References: <1410723213-22440-1-git-send-email-ryazanov.s.a@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 This code parts should depend on a config symbol defined in the driver instead of arch specific one. Signed-off-by: Sergey Ryazanov Cc: Jiri Slaby Cc: Nick Kossifidis Cc: "Luis R. Rodriguez" Cc: linux-wireless@vger.kernel.org Cc: ath5k-devel@lists.ath5k.org --- drivers/net/wireless/ath/ath5k/ath5k.h | 2 +- drivers/net/wireless/ath/ath5k/base.c | 4 ++-- drivers/net/wireless/ath/ath5k/led.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h index 85316bb..1ed7a88 100644 --- a/drivers/net/wireless/ath/ath5k/ath5k.h +++ b/drivers/net/wireless/ath/ath5k/ath5k.h @@ -1647,7 +1647,7 @@ static inline struct ath_regulatory *ath5k_hw_regulatory(struct ath5k_hw *ah) return &(ath5k_hw_common(ah)->regulatory); } -#ifdef CONFIG_ATHEROS_AR231X +#ifdef CONFIG_ATH5K_AHB #define AR5K_AR2315_PCI_BASE ((void __iomem *)0xb0100000) static inline void __iomem *ath5k_ahb_reg(struct ath5k_hw *ah, u16 reg) diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 8ad2550..dd42487 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -99,7 +99,7 @@ static int ath5k_reset(struct ath5k_hw *ah, struct ieee80211_channel *chan, /* Known SREVs */ static const struct ath5k_srev_name srev_names[] = { -#ifdef CONFIG_ATHEROS_AR231X +#ifdef CONFIG_ATH5K_AHB { "5312", AR5K_VERSION_MAC, AR5K_SREV_AR5312_R2 }, { "5312", AR5K_VERSION_MAC, AR5K_SREV_AR5312_R7 }, { "2313", AR5K_VERSION_MAC, AR5K_SREV_AR2313_R8 }, @@ -142,7 +142,7 @@ static const struct ath5k_srev_name srev_names[] = { { "5413", AR5K_VERSION_RAD, AR5K_SREV_RAD_5413 }, { "5424", AR5K_VERSION_RAD, AR5K_SREV_RAD_5424 }, { "5133", AR5K_VERSION_RAD, AR5K_SREV_RAD_5133 }, -#ifdef CONFIG_ATHEROS_AR231X +#ifdef CONFIG_ATH5K_AHB { "2316", AR5K_VERSION_RAD, AR5K_SREV_RAD_2316 }, { "2317", AR5K_VERSION_RAD, AR5K_SREV_RAD_2317 }, #endif diff --git a/drivers/net/wireless/ath/ath5k/led.c b/drivers/net/wireless/ath/ath5k/led.c index 48a6a69b..c730677 100644 --- a/drivers/net/wireless/ath/ath5k/led.c +++ b/drivers/net/wireless/ath/ath5k/led.c @@ -162,7 +162,7 @@ int ath5k_init_leds(struct ath5k_hw *ah) { int ret = 0; struct ieee80211_hw *hw = ah->hw; -#ifndef CONFIG_ATHEROS_AR231X +#ifndef CONFIG_ATH5K_AHB struct pci_dev *pdev = ah->pdev; #endif char name[ATH5K_LED_MAX_NAME_LEN + 1]; @@ -171,7 +171,7 @@ int ath5k_init_leds(struct ath5k_hw *ah) if (!ah->pdev) return 0; -#ifdef CONFIG_ATHEROS_AR231X +#ifdef CONFIG_ATH5K_AHB match = NULL; #else match = pci_match_id(&ath5k_led_devices[0], pdev);