linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jordan Crouse <jcrouse@codeaurora.org>
To: Georgi Djakov <georgi.djakov@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andy Gross <agross@kernel.org>,
	linux-arm-msm@vger.kernel.org
Subject: [PATCH v1 1/2] interconnect: Move interconnect drivers to core_initcall
Date: Thu, 31 Oct 2019 12:28:51 -0600	[thread overview]
Message-ID: <1572546532-19248-2-git-send-email-jcrouse@codeaurora.org> (raw)
In-Reply-To: <1572546532-19248-1-git-send-email-jcrouse@codeaurora.org>

The interconnect drivers are essential to nearly every leaf driver and
subcomponent in the SoC. Initialize them at the core_initcall level
so that they are available to their dependent drivers when built in.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
---

 drivers/interconnect/qcom/msm8974.c | 14 +++++++++++++-
 drivers/interconnect/qcom/qcs404.c  | 14 +++++++++++++-
 drivers/interconnect/qcom/sdm845.c  | 13 ++++++++++++-
 3 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/drivers/interconnect/qcom/msm8974.c b/drivers/interconnect/qcom/msm8974.c
index c70ac58..9386d5c 100644
--- a/drivers/interconnect/qcom/msm8974.c
+++ b/drivers/interconnect/qcom/msm8974.c
@@ -778,7 +778,19 @@ static struct platform_driver msm8974_noc_driver = {
 		.of_match_table = msm8974_noc_of_match,
 	},
 };
-module_platform_driver(msm8974_noc_driver);
+
+static int __init msm8974_noc_driver_init(void)
+{
+	return platform_driver_register(&msm8974_noc_driver);
+}
+core_initcall(msm8974_noc_driver_init);
+
+static void __exit msm8974_noc_driver_exit(void)
+{
+	platform_driver_unregister(&msm8974_noc_driver);
+}
+module_exit(msm8974_noc_driver_exit);
+
 MODULE_DESCRIPTION("Qualcomm MSM8974 NoC driver");
 MODULE_AUTHOR("Brian Masney <masneyb@onstation.org>");
 MODULE_LICENSE("GPL v2");
diff --git a/drivers/interconnect/qcom/qcs404.c b/drivers/interconnect/qcom/qcs404.c
index b4966d8..7dd3e76 100644
--- a/drivers/interconnect/qcom/qcs404.c
+++ b/drivers/interconnect/qcom/qcs404.c
@@ -535,6 +535,18 @@ static struct platform_driver qcs404_noc_driver = {
 		.of_match_table = qcs404_noc_of_match,
 	},
 };
-module_platform_driver(qcs404_noc_driver);
+
+static int __init qcs404_noc_driver_init(void)
+{
+	return platform_driver_register(&qcs404_noc_driver);
+}
+core_initcall(qcs404_noc_driver_init);
+
+static void __exit qcs404_noc_driver_exit(void)
+{
+	platform_driver_unregister(&qcs404_noc_driver);
+}
+module_exit(qcs404_noc_driver_exit);
+
 MODULE_DESCRIPTION("Qualcomm QCS404 NoC driver");
 MODULE_LICENSE("GPL v2");
diff --git a/drivers/interconnect/qcom/sdm845.c b/drivers/interconnect/qcom/sdm845.c
index 502a6c2..4dab92a 100644
--- a/drivers/interconnect/qcom/sdm845.c
+++ b/drivers/interconnect/qcom/sdm845.c
@@ -892,7 +892,18 @@ static struct platform_driver qnoc_driver = {
 		.of_match_table = qnoc_of_match,
 	},
 };
-module_platform_driver(qnoc_driver);
+
+static int __init qnoc_driver_init(void)
+{
+	return platform_driver_register(&qnoc_driver);
+}
+core_initcall(qnoc_driver_init);
+
+static void __exit qnoc_driver_exit(void)
+{
+	platform_driver_unregister(&qnoc_driver);
+}
+module_exit(qnoc_driver_exit);
 
 MODULE_AUTHOR("David Dai <daidavid1@codeaurora.org>");
 MODULE_DESCRIPTION("Qualcomm sdm845 NoC driver");
-- 
2.7.4


  reply	other threads:[~2019-10-31 18:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-31 18:28 [PATCH v1 0/2] interconnect: Move qcom interconnect drivers to core_initcall Jordan Crouse
2019-10-31 18:28 ` Jordan Crouse [this message]
2019-10-31 18:30   ` [PATCH v1 1/2] interconnect: Move " Bjorn Andersson
2019-10-31 18:28 ` [PATCH v1 2/2] interconnect: Remove unused module exit code from core Jordan Crouse
2019-10-31 18:32   ` Bjorn Andersson

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=1572546532-19248-2-git-send-email-jcrouse@codeaurora.org \
    --to=jcrouse@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=georgi.djakov@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).