From patchwork Sun Jan 25 13:02:48 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: 5701441 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 8AC649F1D6 for ; Sun, 25 Jan 2015 13:03:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A39A820117 for ; Sun, 25 Jan 2015 13:03:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A9DF220107 for ; Sun, 25 Jan 2015 13:03:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753262AbbAYNDG (ORCPT ); Sun, 25 Jan 2015 08:03:06 -0500 Received: from mail-wi0-f176.google.com ([209.85.212.176]:52193 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751537AbbAYNDE (ORCPT ); Sun, 25 Jan 2015 08:03:04 -0500 Received: by mail-wi0-f176.google.com with SMTP id em10so5162030wid.3 for ; Sun, 25 Jan 2015 05:03:02 -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:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=k7ee1hqKSsrzCRz9ZNDO/+O3WSZ890v2HzoYOLvdcGA=; b=Km49Yzj5G9Tdcfm3aIms/Zx5VCs328OaitQTUoc0Ja5YJg/2frzHTGoBQ1lNhlWiDh OCpDq4WB43WX+HtVlalR8QqqiBHZdRnnYatItkUIlYYiVNQNENPmojj9GPb7x/Hff5jF I2pU0FPcPYhogRdcEQrLZPsS+dndGaCA2nShA62hGZxSXNGaDEosvyL1c711FEqrjHJM qFw/JWQEy9G9zOx2JcAmesiued/HQ/gGwmt4mOrfcSK5NIlxYCjz45QAd8P2o+CwAT+i SB7gv5FTIzqv1Xi1Uw26SaYTYacPz9I4yJPx2FF0kXY3A8GD1eRXMYxsjw40gRpaZe4g mY6w== X-Received: by 10.194.2.178 with SMTP id 18mr34001497wjv.67.1422190982857; Sun, 25 Jan 2015 05:03:02 -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 i3sm9694363wie.23.2015.01.25.05.03.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Jan 2015 05:03:02 -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 V2 1/2] bcma: add empty PCIe hostmode functions if support is disabled Date: Sun, 25 Jan 2015 14:02:48 +0100 Message-Id: <1422190968-14422-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1422180674-9592-1-git-send-email-zajec5@gmail.com> References: <1422180674-9592-1-git-send-email-zajec5@gmail.com> 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 --- V2: Return false in bcma_core_pci_is_in_hostmode Don't (accidentally) modify bcma_host_soc_register_driver --- drivers/bcma/bcma_private.h | 8 ++++++++ drivers/bcma/driver_pci.c | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h index 3f314c9..ac6c5fc 100644 --- a/drivers/bcma/bcma_private.h +++ b/drivers/bcma/bcma_private.h @@ -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 false; +} +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);