mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
nvmem: rockchip-otp: Fix later provider initialization
Possibly, provider driver initialization is later than consumer driver. Use function subsys_initcall to initialize NVMEM provider early to ensure NVMEM consumer doesn't need to -EPROBE_DEFER. Change-Id: Ibaea188390a54d55eca2aa3585cace7bb8f37bb3 Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
@@ -616,6 +616,26 @@ static struct platform_driver rockchip_otp_driver = {
|
||||
},
|
||||
};
|
||||
|
||||
module_platform_driver(rockchip_otp_driver);
|
||||
static int __init rockchip_otp_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = platform_driver_register(&rockchip_otp_driver);
|
||||
if (ret) {
|
||||
pr_err("failed to register otp driver\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit rockchip_otp_exit(void)
|
||||
{
|
||||
return platform_driver_unregister(&rockchip_otp_driver);
|
||||
}
|
||||
|
||||
subsys_initcall(rockchip_otp_init);
|
||||
module_exit(rockchip_otp_exit);
|
||||
|
||||
MODULE_DESCRIPTION("Rockchip OTP driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
||||
Reference in New Issue
Block a user