Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7af376e authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar Committed by David Collins
Browse files

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: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 3f66393f
Loading
Loading
Loading
Loading
+9 −13
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2015, 2017-2018 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
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. */

#include <linux/bitmap.h>
#include <linux/delay.h>
#include <linux/err.h>
@@ -1328,7 +1319,12 @@ static struct platform_driver spmi_pmic_arb_driver = {
		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
	},
};
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");