Skip to contentSkip to conversation

ARM: OMAP2+: Remove omap2_clk_set_parent function

PATCH In review Jon Hunter 1 participant 1 message May 22, 2012

Subsystems (4)
lore
Share & tools
lore

Jon Hunter

author
#0 lore raw

PATCH 2/5 ARM: OMAP2+: Remove omap2_clk_set_parent function

From: Jon Hunter <[email protected]>

The function omap2_clk_set_parent is just a wrapper for the omap_clksel_set_parent() function. Now we have moved the omap_clksel_set_parent() function into the plat-omap directory for all OMAP devices to use, we should just use this function directly and we can eliminate the OMAP2 function.

---
 arch/arm/mach-omap2/clock.c      |   13 +------------
 arch/arm/plat-omap/clkt_clksel.c |    3 +++
 2 files changed, 4 insertions(+), 12 deletions(-)
arch/arm/mach-omap2/clock.c +1 -12
index 2049cb2..b17d539 100644
@@ -385,17 +385,6 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate)
 	return ret;
 }
 
-int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
-{
-	if (!clk->clksel)
-		return -EINVAL;
-
-	if (clk->parent == new_parent)
-		return 0;
-
-	return omap_clksel_set_parent(clk, new_parent);
-}
-
 /* OMAP3/4 non-CORE DPLL clkops */
 
 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
@@ -532,7 +521,7 @@ struct clk_functions omap2_clk_functions = {
 	.clk_disable		= omap2_clk_disable,
 	.clk_round_rate		= omap2_clk_round_rate,
 	.clk_set_rate		= omap2_clk_set_rate,
-	.clk_set_parent		= omap2_clk_set_parent,
+	.clk_set_parent		= omap_clksel_set_parent,
 	.clk_disable_unused	= omap2_clk_disable_unused,
 };
 
arch/arm/plat-omap/clkt_clksel.c +3 -0
index 85622f8..e47b704 100644
@@ -484,6 +484,9 @@ int omap_clksel_set_parent(struct clk *clk, struct clk *new_parent)
 	if (!clk->clksel || !clk->clksel_mask)
 		return -EINVAL;
 
+	if (clk->parent == new_parent)
+		return 0;
+
 	parent_div = _get_div_and_fieldval(new_parent, clk, &field_val);
 	if (!parent_div)
 		return -EINVAL;
Signature · 1 line
1.7.9.5