summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorSaravana Kannan <saravanak@google.com>2019-08-06 19:05:58 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-07 17:37:48 +0200
commit5adf5781019dd21233d6d13ab0d78bf03a13d4f1 (patch)
tree0c09efe652f8fa3538faf4b99c4fd7860e18d3b0 /drivers/of
parent0ad0bdd8ba6489d05044aa5ca6c6f7491be7743c (diff)
downloadlinux-5adf5781019dd21233d6d13ab0d78bf03a13d4f1.tar.gz
linux-5adf5781019dd21233d6d13ab0d78bf03a13d4f1.tar.bz2
linux-5adf5781019dd21233d6d13ab0d78bf03a13d4f1.zip
of/platform: Fix device_links_supplier_sync_state_resume() warning
In platforms/devices which have CONFIG_OF turned on but don't have a populated DT, the calls to device_links_supplier_sync_state_pause() and device_links_supplier_sync_state_resume() can get mismatched. This will cause a warning during boot. Fix the warning by making sure the calls are matched even in that case. Reported-by: Qian Cai <cai@lca.pw> Signed-off-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20190807020559.74458-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/platform.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index f68de5c4aeff..a3cd69772264 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -723,7 +723,8 @@ arch_initcall_sync(of_platform_default_populate_init);
static int __init of_platform_sync_state_init(void)
{
- device_links_supplier_sync_state_resume();
+ if (of_have_populated_dt())
+ device_links_supplier_sync_state_resume();
return 0;
}
late_initcall_sync(of_platform_sync_state_init);