Skip to contentSkip to conversation

m68knommu: fix arch devm_get_clk() for some ColdFire parts

PATCH New [email protected] 1 participant 1 message Sep 10, 2012 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68knommu: fix arch devm_get_clk() for some ColdFire parts

From: Greg Ungerer <[email protected]>

The arch local devm_get_clk() is always returning the NULL clock even on the ColdFire parts that we keep a list of clocks for. This breaks drivers that look for CPU clocks, like the Freescale FEC ethernet driver. So this is currently broken on ColdFire 520x, 532x amd 5441x SoC parts. All other ColdFire parts still work.

The simple clocking code traditionaly used by ColdFire parts didn't keep a list of clocks, and returned NULL for clk_get(). With commit fe66158a ("m68knommu: Add clk definitions for m520x.") for example we now do have a list of real clocks for some ColdFire parts. The local devm_get_clk() function needs to return the clock struct on these, which it can easily do using the existing local clk_get().

---
 arch/m68k/platform/coldfire/clk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/m68k/platform/coldfire/clk.c +1 -1
index 75f9ee9..ca1d8fa 100644
@@ -149,6 +149,6 @@ struct clk_ops clk_ops1 = {
 
 struct clk *devm_clk_get(struct device *dev, const char *id)
 {
-	return NULL;
+	return clk_get(dev, id);
 }
 EXPORT_SYMBOL(devm_clk_get);
Signature · 1 line
1.7.0.4