clk: qcom: common: Fix clk_debug_init failure

Remove subsys_initcall trigger for clk_debug_init(), as root clk debugfs
directory is not ready by that time. And make sure that clk_debug_init()
is called after the clk framework's clk_debug_init().

Change-Id: Ie90b89e4156e7f5631e9e58316534bf806012853
Signed-off-by: Imran Shaik <quic_imrashai@quicinc.com>
This commit is contained in:
Imran Shaik 2022-05-25 12:06:39 +05:30 committed by Mike Tipton
parent 0fd73c1d3c
commit 6f6c0c5b1b
2 changed files with 6 additions and 6 deletions

View File

@ -25,6 +25,7 @@
static struct clk_hw *measure;
static bool debug_suspend;
static bool debug_suspend_atomic;
static bool qcom_clk_debug_inited;
static struct dentry *clk_debugfs_suspend;
static struct dentry *clk_debugfs_suspend_atomic;
@ -765,6 +766,10 @@ void clk_common_debug_init(struct clk_hw *hw, struct dentry *dentry)
debugfs_create_file("clk_print_regs", 0444, dentry, hw,
&clock_print_hw_fops);
if (!qcom_clk_debug_inited) {
clk_debug_init();
qcom_clk_debug_inited = true;
}
}
static int clk_list_rate_vdd_level(struct clk_hw *hw, unsigned int rate)

View File

@ -2,6 +2,7 @@
/*
* Copyright (c) 2013-2014, 2017-2021, The Linux Foundation.
* All rights reserved.
* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/export.h>
@ -589,12 +590,6 @@ int qcom_cc_runtime_suspend(struct device *dev)
}
EXPORT_SYMBOL(qcom_cc_runtime_suspend);
static int __init qcom_clk_init(void)
{
return clk_debug_init();
}
subsys_initcall(qcom_clk_init);
static void __exit qcom_clk_exit(void)
{
clk_debug_exit();