aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubbaraman Narayanamurthy <subbaram@codeaurora.org>2018-06-27 17:32:38 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-02-24 22:01:59 -0800
commiteb683a49e25452374a19e38bff24b92918863c50 (patch)
tree06fd0ad29d783e6b806b87e4519cfbc2c149d29e
parent3be794850053bbe2c9bc3577538e0f3938d9d94f (diff)
spmi: spmi-pmic-arb-debug: Change the probe init orderLA.UM.7.3.r1-06900-sdm845.0
Currently, both the regular and debug spmi pmic arbiter devices are probed in the same initcall order (arch_init). This is fine. However, most of the sepolicy rules set in the userspace are for the PMIC devices under spmi-0 bus. If the debug spmi pmic arbiter device probes first and takes "spmi-0" name, then the sepolicy rules set will be broken. Fix it by changing the probe init order of debug spmi pmic arbiter device to module init. Change-Id: I145e78a205bc80f274d8d926353a88255a7f4167 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
-rw-r--r--drivers/spmi/spmi-pmic-arb-debug.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/spmi/spmi-pmic-arb-debug.c b/drivers/spmi/spmi-pmic-arb-debug.c
index 2c90bef1224f..48fe4e985ff5 100644
--- a/drivers/spmi/spmi-pmic-arb-debug.c
+++ b/drivers/spmi/spmi-pmic-arb-debug.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -365,17 +365,7 @@ static struct platform_driver spmi_pmic_arb_debug_driver = {
},
};
-int __init spmi_pmic_arb_debug_init(void)
-{
- return platform_driver_register(&spmi_pmic_arb_debug_driver);
-}
-arch_initcall(spmi_pmic_arb_debug_init);
-
-static void __exit spmi_pmic_arb_debug_exit(void)
-{
- platform_driver_unregister(&spmi_pmic_arb_debug_driver);
-}
-module_exit(spmi_pmic_arb_debug_exit);
+module_platform_driver(spmi_pmic_arb_debug_driver);
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:spmi_pmic_arb_debug");