Skip to contentSkip to conversation

ARM: sa1100: add dummy clk_set_rate implementation

PATCH New Dmitry Eremin-Solenikov 1 participant 1 message Feb 11, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: sa1100: add dummy clk_set_rate implementation

Add dummy clk_set_rate implementation that returns -EINVAL if the rate passed is not equal to the rate of the clock. This for example fixes the following build issue:

ERROR: "clk_set_rate" [drivers/usb/phy/phy-generic.ko] undefined! scripts/Makefile.modpost:90: recipe for target '__modpost' failed

---
 arch/arm/mach-sa1100/clock.c | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/mach-sa1100/clock.c +9 -0
index 03c75a8..7f9544d 100644
@@ -104,6 +104,15 @@ unsigned long clk_get_rate(struct clk *clk)
 }
 EXPORT_SYMBOL(clk_get_rate);
 
+int clk_set_rate(struct clk *clk, unsigned long rate)
+{
+	if (rate != clk_get_rate(clk))
+		return -EINVAL;
+
+	return 0;
+}
+EXPORT_SYMBOL(clk_set_rate);
+
 const struct clkops clk_gpio27_ops = {
 	.enable		= clk_gpio27_enable,
 	.disable	= clk_gpio27_disable,
Signature · 1 line
2.1.4