From patchwork Wed Oct 21 02:15:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Yiwei X-Patchwork-Id: 11848167 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF3F714B4 for ; Wed, 21 Oct 2020 02:22:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C965222251 for ; Wed, 21 Oct 2020 02:22:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2411163AbgJUCWK (ORCPT ); Tue, 20 Oct 2020 22:22:10 -0400 Received: from alexa-out-tai-02.qualcomm.com ([103.229.16.227]:30402 "EHLO alexa-out-tai-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394050AbgJUCWK (ORCPT ); Tue, 20 Oct 2020 22:22:10 -0400 X-Greylist: delayed 366 seconds by postgrey-1.27 at vger.kernel.org; Tue, 20 Oct 2020 22:22:09 EDT Received: from ironmsg01-tai.qualcomm.com ([10.249.140.6]) by alexa-out-tai-02.qualcomm.com with ESMTP; 21 Oct 2020 10:16:02 +0800 X-QCInternal: smtphost Received: from hyiwei-gv.qualcomm.com (HELO hyiwei-gv) ([10.231.253.155]) by ironmsg01-tai.qualcomm.com with ESMTP/TLS/AES256-SHA; 21 Oct 2020 10:15:55 +0800 From: Huang Yiwei To: jassisinghbrar@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org Cc: Huang Yiwei , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH] mailbox: qcom: Support building QCOM IPCC driver as module Date: Wed, 21 Oct 2020 10:15:52 +0800 Message-Id: <1603246552-23601-1-git-send-email-hyiwei@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Change CONFIG_QCOM_IPCC to tristate and add exit function to support module build for QCOM IPCC driver. Signed-off-by: Huang Yiwei --- drivers/mailbox/Kconfig | 2 +- drivers/mailbox/qcom-ipcc.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig index 05b1009..78f3006 100644 --- a/drivers/mailbox/Kconfig +++ b/drivers/mailbox/Kconfig @@ -245,7 +245,7 @@ config SPRD_MBOX you want to build the Spreatrum mailbox controller driver. config QCOM_IPCC - bool "Qualcomm Technologies, Inc. IPCC driver" + tristate "Qualcomm Technologies, Inc. IPCC driver" depends on ARCH_QCOM || COMPILE_TEST help Qualcomm Technologies, Inc. Inter-Processor Communication Controller diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c index 2d13c72..1ed9a87 100644 --- a/drivers/mailbox/qcom-ipcc.c +++ b/drivers/mailbox/qcom-ipcc.c @@ -280,6 +280,12 @@ static int __init qcom_ipcc_init(void) } arch_initcall(qcom_ipcc_init); +static __exit void qcom_ipcc_exit(void) +{ + platform_driver_unregister(&qcom_ipcc_driver); +} +module_exit(qcom_ipcc_exit); + MODULE_AUTHOR("Venkata Narendra Kumar Gutta "); MODULE_AUTHOR("Manivannan Sadhasivam "); MODULE_DESCRIPTION("Qualcomm Technologies, Inc. IPCC driver");