From patchwork Tue Mar 12 18:41:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Brown X-Patchwork-Id: 2258051 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 3F34DDF23A for ; Tue, 12 Mar 2013 18:47:07 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFUAR-0007sV-Sl; Tue, 12 Mar 2013 18:43:20 +0000 Received: from wolverine02.qualcomm.com ([199.106.114.251]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFU9K-0007cT-5p for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2013 18:42:12 +0000 X-IronPort-AV: E=Sophos;i="4.84,832,1355126400"; d="scan'208";a="29083606" Received: from pdmz-ns-snip_115.254.qualcomm.com (HELO mostmsg01.qualcomm.com) ([199.106.115.254]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Mar 2013 11:42:04 -0700 Received: from codeaurora.org (pdmz-ns-snip_218_1.qualcomm.com [192.168.218.1]) by mostmsg01.qualcomm.com (Postfix) with ESMTPA id 6081510004DF; Tue, 12 Mar 2013 11:42:04 -0700 (PDT) From: David Brown To: Greg Kroah-Hartman Subject: [PATCH v2 04/11] ssbi: Allow compilation as a module Date: Tue, 12 Mar 2013 11:41:49 -0700 Message-Id: <1363113716-25897-5-git-send-email-davidb@codeaurora.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1363113716-25897-1-git-send-email-davidb@codeaurora.org> References: <1362616187-21089-1-git-send-email-davidb@codeaurora.org> <1363113716-25897-1-git-send-email-davidb@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130312_144210_744861_24321228 X-CRM114-Status: GOOD ( 11.91 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [199.106.114.251 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan Huntsman , Daniel Walker , David Brown , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The ssbi driver's read/write entry points are protected with wrappers in the case when the driver isn't enabled. These wrappers don't make any sense, since a client of the SSBI bus won't work without it. Make these just regular functions, so that the SSBI driver can be built as a module. Signed-off-by: David Brown --- drivers/ssbi/Kconfig | 2 +- include/linux/msm_ssbi.h | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/ssbi/Kconfig b/drivers/ssbi/Kconfig index b57c41b..c7bc534 100644 --- a/drivers/ssbi/Kconfig +++ b/drivers/ssbi/Kconfig @@ -5,7 +5,7 @@ menu "Qualcomm MSM SSBI bus support" config MSM_SSBI - bool "Qualcomm Single-wire Serial Bus Interface (SSBI)" + tristate "Qualcomm Single-wire Serial Bus Interface (SSBI)" help If you say yes to this option, support will be included for the built-in SSBI interface on Qualcomm MSM family processors. diff --git a/include/linux/msm_ssbi.h b/include/linux/msm_ssbi.h index cfa47df..0fe245b 100644 --- a/include/linux/msm_ssbi.h +++ b/include/linux/msm_ssbi.h @@ -33,17 +33,6 @@ struct msm_ssbi_platform_data { enum msm_ssbi_controller_type controller_type; }; -#ifdef CONFIG_MSM_SSBI int msm_ssbi_write(struct device *dev, u16 addr, u8 *buf, int len); int msm_ssbi_read(struct device *dev, u16 addr, u8 *buf, int len); -#else -static inline int msm_ssbi_write(struct device *dev, u16 addr, u8 *buf, int len) -{ - return -ENXIO; -} -static inline int msm_ssbi_read(struct device *dev, u16 addr, u8 *buf, int len) -{ - return -ENXIO; -} -#endif #endif