From: Finley Xiao Date: Mon, 31 Oct 2016 07:58:01 +0000 (+0800) Subject: nvmem: rockchip-efuse: Change initcall to subsys X-Git-Tag: firefly_0821_release~1331 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=143cafb285837c5b72e7352c24f6adf308c4b349;p=firefly-linux-kernel-4.4.55.git nvmem: rockchip-efuse: Change initcall to subsys We will add a avs driver to adjust opp's voltage according to leakage. As it need register a notifier before cpufreq starts, and make cpufreq defer probe is probably not really easy, so avs should probe earlier than cpufreq, efuse should probe earlier than avs. Change-Id: I817aa44c3b34d2fdf44148e6b9649ceed76d8f1f Signed-off-by: Finley Xiao --- diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c index 423907bdd259..92417aec0df6 100644 --- a/drivers/nvmem/rockchip-efuse.c +++ b/drivers/nvmem/rockchip-efuse.c @@ -181,7 +181,7 @@ static const struct of_device_id rockchip_efuse_match[] = { }; MODULE_DEVICE_TABLE(of, rockchip_efuse_match); -static int rockchip_efuse_probe(struct platform_device *pdev) +static int __init rockchip_efuse_probe(struct platform_device *pdev) { struct resource *res; struct nvmem_device *nvmem; @@ -231,7 +231,6 @@ static int rockchip_efuse_remove(struct platform_device *pdev) } static struct platform_driver rockchip_efuse_driver = { - .probe = rockchip_efuse_probe, .remove = rockchip_efuse_remove, .driver = { .name = "rockchip-efuse", @@ -239,6 +238,13 @@ static struct platform_driver rockchip_efuse_driver = { }, }; -module_platform_driver(rockchip_efuse_driver); +static int __init rockchip_efuse_module_init(void) +{ + return platform_driver_probe(&rockchip_efuse_driver, + rockchip_efuse_probe); +} + +subsys_initcall(rockchip_efuse_module_init); + MODULE_DESCRIPTION("rockchip_efuse driver"); MODULE_LICENSE("GPL v2");