From patchwork Sun Jan 25 10:11:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 5700941 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 81A499F2ED for ; Sun, 25 Jan 2015 10:11:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8CC5B201F2 for ; Sun, 25 Jan 2015 10:11:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C7E1201E4 for ; Sun, 25 Jan 2015 10:11:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752570AbbAYKL0 (ORCPT ); Sun, 25 Jan 2015 05:11:26 -0500 Received: from mail-wg0-f49.google.com ([74.125.82.49]:37162 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752517AbbAYKL0 (ORCPT ); Sun, 25 Jan 2015 05:11:26 -0500 Received: by mail-wg0-f49.google.com with SMTP id k14so4456699wgh.8 for ; Sun, 25 Jan 2015 02:11:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=7qsx0MshFW6nTQOUMNiMvLAPgyqI9wgpGJSWP2Ii6a0=; b=J2r3Sw7N/mNayYgfFv2njSHnr6C+/9fJr0bw4GNnOFYDflVda+27JCFAiactWqY4Uj iXSEqU2Q2sKm0gQeqUSX/BdQqA8/ZlXMr1klbZrwET8NuTSFuyWzigFN1HqBiUyhvlkc 8pf7ZjtsBELuM2Vodfbekh7XmhlyzyZNj2pSAetwKxYA8+m659Q7G5cakNKfYCGn006S ruQTEX3WkVVytpN0C2j34T4MQrnkcRfdByRjwmgE5fAYMuQRnLOD4zVZ+2NEnzhjcRJP YpphSwOHUy3SLXwugAHo5U6ewSebF4Qw4YhN74bzbYHC4fvt3vwuJYfuDW9I6LAFPF8c yNwA== X-Received: by 10.194.250.5 with SMTP id yy5mr31803897wjc.133.1422180684477; Sun, 25 Jan 2015 02:11:24 -0800 (PST) Received: from linux-tdhb.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by mx.google.com with ESMTPSA id k3sm9548300wje.30.2015.01.25.02.11.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Jan 2015 02:11:23 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo , linux-wireless@vger.kernel.org Cc: Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH 1/2] bcma: add empty PCIe hostmode functions if support is disabled Date: Sun, 25 Jan 2015 11:11:13 +0100 Message-Id: <1422180674-9592-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 MIME-Version: 1.0 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, 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 This allows us to drop some #ifdef magic (mess). Signed-off-by: Rafa? Mi?ecki --- drivers/bcma/bcma_private.h | 10 +++++++++- drivers/bcma/driver_pci.c | 2 -- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h index 3f314c9..3242655 100644 --- a/drivers/bcma/bcma_private.h +++ b/drivers/bcma/bcma_private.h @@ -92,7 +92,7 @@ extern void __exit bcma_host_soc_unregister_driver(void); #else static inline int __init bcma_host_soc_register_driver(void) { - return 0; + return false; } static inline void __exit bcma_host_soc_unregister_driver(void) { @@ -107,6 +107,14 @@ extern int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc); #ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc); void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc); +#else +static inline bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc) +{ + return 0; +} +static inline void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc) +{ +} #endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */ #ifdef CONFIG_BCMA_DRIVER_GPIO diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c index 50329d1..b85a505 100644 --- a/drivers/bcma/driver_pci.c +++ b/drivers/bcma/driver_pci.c @@ -226,11 +226,9 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc) if (pc->setup_done) return; -#ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE pc->hostmode = bcma_core_pci_is_in_hostmode(pc); if (pc->hostmode) bcma_core_pci_hostmode_init(pc); -#endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */ if (!pc->hostmode) bcma_core_pci_clientmode_init(pc);