Re: [PATCH v1 1/2] interconnect: Move interconnect drivers to core_initcall

From: Bjorn Andersson
Date: Thu Oct 31 2019 - 14:30:49 EST


On Thu 31 Oct 11:28 PDT 2019, Jordan Crouse wrote:

> 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@xxxxxxxxxxxxxx>

Reviewed-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>

> ---
>
> 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@xxxxxxxxxxxxx>");
> 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@xxxxxxxxxxxxxx>");
> MODULE_DESCRIPTION("Qualcomm sdm845 NoC driver");
> --
> 2.7.4
>