[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1572546532-19248-2-git-send-email-jcrouse@codeaurora.org>
Date: Thu, 31 Oct 2019 12:28:51 -0600
From: Jordan Crouse <jcrouse@...eaurora.org>
To: Georgi Djakov <georgi.djakov@...aro.org>
Cc: Bjorn Andersson <bjorn.andersson@...aro.org>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Andy Gross <agross@...nel.org>, linux-arm-msm@...r.kernel.org
Subject: [PATCH v1 1/2] interconnect: Move interconnect drivers to core_initcall
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@...eaurora.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@...tation.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@...eaurora.org>");
MODULE_DESCRIPTION("Qualcomm sdm845 NoC driver");
--
2.7.4
Powered by blists - more mailing lists