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

Commit 497295af authored by Stephen Boyd's avatar Stephen Boyd Committed by Michael Turquette
Browse files

clk: Replace __clk_get_num_parents with clk_hw_get_num_parents()



Mostly converted with the following semantic patch:

@@
struct clk_hw *E;
@@

-__clk_get_num_parents(E->clk)
+clk_hw_get_num_parents(E)

Acked-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Cc: Chao Xie <chao.xie@marvell.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: "Emilio López" <emilio@elopez.com.ar>
Acked-by: default avatarTero Kristo <t-kristo@ti.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 1a9c069c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ static int clk_programmable_determine_rate(struct clk_hw *hw,
	int shift;
	int i;

	for (i = 0; i < __clk_get_num_parents(hw->clk); i++) {
	for (i = 0; i < clk_hw_get_num_parents(hw); i++) {
		parent = clk_get_parent_by_index(hw->clk, i);
		if (!parent)
			continue;
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ static int at91sam9x5_clk_usb_determine_rate(struct clk_hw *hw,
	int tmp_diff;
	int i;

	for (i = 0; i < __clk_get_num_parents(hw->clk); i++) {
	for (i = 0; i < clk_hw_get_num_parents(hw); i++) {
		int div;

		parent = clk_get_parent_by_index(hw->clk, i);
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ static int clk_composite_determine_rate(struct clk_hw *hw,
			return 0;
		}

		for (i = 0; i < __clk_get_num_parents(mux_hw->clk); i++) {
		for (i = 0; i < clk_hw_get_num_parents(mux_hw); i++) {
			parent = clk_get_parent_by_index(mux_hw->clk, i);
			if (!parent)
				continue;
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
static u8 clk_mux_get_parent(struct clk_hw *hw)
{
	struct clk_mux *mux = to_clk_mux(hw);
	int num_parents = __clk_get_num_parents(hw->clk);
	int num_parents = clk_hw_get_num_parents(hw);
	u32 val;

	/*
+4 −4
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ static unsigned int _get_div(struct mmp_clk_mix *mix, unsigned int val)

static unsigned int _get_mux(struct mmp_clk_mix *mix, unsigned int val)
{
	int num_parents = __clk_get_num_parents(mix->hw.clk);
	int num_parents = clk_hw_get_num_parents(&mix->hw);
	int i;

	if (mix->mux_flags & CLK_MUX_INDEX_BIT)
@@ -241,7 +241,7 @@ static int mmp_clk_mix_determine_rate(struct clk_hw *hw,
			}
		}
	} else {
		for (i = 0; i < __clk_get_num_parents(mix_clk); i++) {
		for (i = 0; i < clk_hw_get_num_parents(hw); i++) {
			parent = clk_get_parent_by_index(mix_clk, i);
			parent_rate = __clk_get_rate(parent);
			div_val_max = _get_maxdiv(mix);
@@ -408,13 +408,13 @@ static int mmp_clk_set_rate(struct clk_hw *hw, unsigned long rate,
		else
			return -EINVAL;
	} else {
		for (i = 0; i < __clk_get_num_parents(mix_clk); i++) {
		for (i = 0; i < clk_hw_get_num_parents(hw); i++) {
			parent = clk_get_parent_by_index(mix_clk, i);
			parent_rate = __clk_get_rate(parent);
			if (parent_rate == best_parent_rate)
				break;
		}
		if (i < __clk_get_num_parents(mix_clk))
		if (i < clk_hw_get_num_parents(hw))
			return _set_rate(mix, _get_mux_val(mix, i),
					_get_div_val(mix, best_divisor), 1, 1);
		else
Loading