spmi: pmic-arb: instantiate spmi_devices at arch_initcall
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. Change-Id: Ib96937f274745549ee86f758673aab4db97acbaf Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org> [collinsd@codeaurora.org: added module exit function] Signed-off-by: David Collins <collinsd@codeaurora.org>
This commit is contained in:
parent
f4031a6aa1
commit
4c8cc75386
@ -1,7 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2012-2015, 2017-2018 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. */
|
||||
|
||||
#include <linux/bitmap.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/err.h>
|
||||
@ -1347,7 +1346,18 @@ static struct platform_driver spmi_pmic_arb_driver = {
|
||||
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
|
||||
},
|
||||
};
|
||||
module_platform_driver(spmi_pmic_arb_driver);
|
||||
|
||||
static int __init spmi_pmic_arb_init(void)
|
||||
{
|
||||
return platform_driver_register(&spmi_pmic_arb_driver);
|
||||
}
|
||||
arch_initcall(spmi_pmic_arb_init);
|
||||
|
||||
static void __exit spmi_pmic_arb_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&spmi_pmic_arb_driver);
|
||||
}
|
||||
module_exit(spmi_pmic_arb_exit);
|
||||
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS("platform:spmi_pmic_arb");
|
||||
|
Loading…
Reference in New Issue
Block a user