All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Yiwei <hyiwei@codeaurora.org>
To: jassisinghbrar@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org
Cc: Huang Yiwei <hyiwei@codeaurora.org>,
	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	[thread overview]
Message-ID: <1603246552-23601-1-git-send-email-hyiwei@codeaurora.org> (raw)

Change CONFIG_QCOM_IPCC to tristate and add exit function to
support module build for QCOM IPCC driver.

Signed-off-by: Huang Yiwei <hyiwei@codeaurora.org>
---
 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 <vnkgutta@codeaurora.org>");
 MODULE_AUTHOR("Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>");
 MODULE_DESCRIPTION("Qualcomm Technologies, Inc. IPCC driver");
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


             reply	other threads:[~2020-10-21  2:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21  2:15 Huang Yiwei [this message]
2020-10-21  5:59 ` [PATCH] mailbox: qcom: Support building QCOM IPCC driver as module Manivannan Sadhasivam
2020-10-23  8:41   ` hyiwei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1603246552-23601-1-git-send-email-hyiwei@codeaurora.org \
    --to=hyiwei@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.