Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 080f4242 authored by David Dai's avatar David Dai
Browse files

clk: remove prepare lock and bus voting in clk_debug_print_hw



Remove prepare lock and bus voting since they can be called
from an atomic context. Bandwidth voting is unnecessary as
print_hw_show already covers for the voting in debug
usecases.

Change-Id: Iba4106e16ea7d1ffab01bef175a57f34aacb0f05
Signed-off-by: default avatarDavid Dai <daidavid1@codeaurora.org>
parent 78204b52
Loading
Loading
Loading
Loading
+7 −12
Original line number Diff line number Diff line
@@ -2935,30 +2935,25 @@ void clk_debug_print_hw(struct clk_core *clk, struct seq_file *f)
	if (!clk->ops->list_registers)
		return;

	clk_prepare_lock();
	if (clk->ops->bus_vote)
		clk->ops->bus_vote(clk->hw, true);

	clk->ops->list_registers(f, clk->hw);

	if (clk->ops->bus_vote)
		clk->ops->bus_vote(clk->hw, false);
	clk_prepare_unlock();
}
EXPORT_SYMBOL(clk_debug_print_hw);

static int print_hw_show(struct seq_file *m, void *unused)
{
	struct clk_core *c = m->private;
	struct clk_core *clk;

	clk_prepare_lock();
	if (c->ops->bus_vote)
		c->ops->bus_vote(c->hw, true);
	for (clk = c; clk; clk = clk->parent)
		if (clk->ops->bus_vote)
			clk->ops->bus_vote(clk->hw, true);

	clk_debug_print_hw(c, m);

	if (c->ops->bus_vote)
		c->ops->bus_vote(c->hw, false);
	for (clk = c; clk; clk = clk->parent)
		if (clk->ops->bus_vote)
			clk->ops->bus_vote(c->hw, false);
	clk_prepare_unlock();

	return 0;