aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index c81803b9ba35..8149764f8438 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -900,6 +900,11 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
900 if (rate == clk->rate) 900 if (rate == clk->rate)
901 goto out; 901 goto out;
902 902
903 if ((clk->flags & CLK_SET_RATE_GATE) && __clk_is_enabled(clk)) {
904 ret = -EBUSY;
905 goto out;
906 }
907
903 /* calculate new rates and get the topmost changed clock */ 908 /* calculate new rates and get the topmost changed clock */
904 top = clk_calc_new_rates(clk, rate); 909 top = clk_calc_new_rates(clk, rate);
905 if (!top) { 910 if (!top) {