From d0154ed359c56cd3447b22f68ada6cc33ccb2e15 Mon Sep 17 00:00:00 2001 From: Jagadeesh Kona Date: Thu, 25 Aug 2022 16:28:15 +0530 Subject: [PATCH] clk: qcom: clk-debug: Remove mutex locking from trace probe callback Trace probe callbacks are called with preemption disabled and locking a mutex inside it is not allowed since it can potentially sleep. Hence remove support for mutex locking in suspend trace probe callback. The resource protected by this mutex clk_hw_debug_list is modified only during registering and deregistering clocks which won't happen during the suspend path, so it is safe to remove the mutex locking. Change-Id: I525099f8bae74808c9690abb43b2dc2da9c0fc88 Signed-off-by: Jagadeesh Kona --- drivers/clk/qcom/clk-debug.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/clk/qcom/clk-debug.c b/drivers/clk/qcom/clk-debug.c index ef744047079f..ffb36a69d973 100644 --- a/drivers/clk/qcom/clk-debug.c +++ b/drivers/clk/qcom/clk-debug.c @@ -966,9 +966,7 @@ static void clk_debug_suspend_trace_probe(void *unused, { if (start && val > 0 && !strcmp("machine_suspend", action)) { pr_info("Enabled Clocks:\n"); - mutex_lock(&clk_debug_lock); clock_debug_print_enabled_clocks(NULL); - mutex_unlock(&clk_debug_lock); } }