Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1653199 > unrolled thread
| Started by | Kiran Gunda <kgunda@codeaurora.org> |
|---|---|
| First post | 2017-05-30 14:50 +0200 |
| Last post | 2017-06-01 00:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH V1 15/15] spmi: pmic-arb: instantiate spmi_devices at arch_initcall Kiran Gunda <kgunda@codeaurora.org> - 2017-05-30 14:50 +0200
Re: [PATCH V1 15/15] spmi: pmic-arb: instantiate spmi_devices at arch_initcall Stephen Boyd <sboyd@codeaurora.org> - 2017-06-01 00:10 +0200
| From | Kiran Gunda <kgunda@codeaurora.org> |
|---|---|
| Date | 2017-05-30 14:50 +0200 |
| Subject | [PATCH V1 15/15] spmi: pmic-arb: instantiate spmi_devices at arch_initcall |
| Message-ID | <tMOL0-7oW-33@gated-at.bofh.it> |
From: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
The spmi arbiter device spawns spmi_devices which in turn spawn
platform_devices for pmic peripherals.
Move the arbiter's driver init to arch_initcall so that the subsequent
devices it spawns get instantiated earlier.
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
---
drivers/spmi/spmi-pmic-arb.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index 767bd2c..069799c 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -1384,7 +1384,12 @@ static int spmi_pmic_arb_remove(struct platform_device *pdev)
.of_match_table = spmi_pmic_arb_match_table,
},
};
-module_platform_driver(spmi_pmic_arb_driver);
+
+int __init spmi_pmic_arb_init(void)
+{
+ return platform_driver_register(&spmi_pmic_arb_driver);
+}
+arch_initcall(spmi_pmic_arb_init);
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:spmi_pmic_arb");
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
--
[toc] | [next] | [standalone]
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Date | 2017-06-01 00:10 +0200 |
| Subject | Re: [PATCH V1 15/15] spmi: pmic-arb: instantiate spmi_devices at arch_initcall |
| Message-ID | <tNjYt-2rH-1@gated-at.bofh.it> |
| In reply to | #1653199 |
On 05/30, Kiran Gunda wrote:
> @@ -1384,7 +1384,12 @@ static int spmi_pmic_arb_remove(struct platform_device *pdev)
> .of_match_table = spmi_pmic_arb_match_table,
> },
> };
> -module_platform_driver(spmi_pmic_arb_driver);
> +
> +int __init spmi_pmic_arb_init(void)
Missing static.
> +{
> + return platform_driver_register(&spmi_pmic_arb_driver);
> +}
> +arch_initcall(spmi_pmic_arb_init);
We also lost module removal. Probably nobody tests it, but still
no mention of that in commit text.
I'm not sure we need this at all though. Is there something that
needs to probe early? Indicating what that is in the commit text
would be helpful.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web