瀏覽代碼

clk: max77686: Correct callback used for checking clock status

Changing status of clock gates in max77686 requires i2c transfers, which
can sleep, so this is done in prepare and unprepare callbacks. Due to
this, checking whether whether the clock is ungated must be done
in is_prepared() callback as well, for consistency.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Tomasz Figa 11 年之前
父節點
當前提交
21c8ed2dc0
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/clk/clk-max77686.c

+ 2 - 2
drivers/clk/clk-max77686.c

@@ -66,7 +66,7 @@ static void max77686_clk_unprepare(struct clk_hw *hw)
 		MAX77686_REG_32KHZ, max77686->mask, ~max77686->mask);
 		MAX77686_REG_32KHZ, max77686->mask, ~max77686->mask);
 }
 }
 
 
-static int max77686_clk_is_enabled(struct clk_hw *hw)
+static int max77686_clk_is_prepared(struct clk_hw *hw)
 {
 {
 	struct max77686_clk *max77686 = to_max77686_clk(hw);
 	struct max77686_clk *max77686 = to_max77686_clk(hw);
 	int ret;
 	int ret;
@@ -84,7 +84,7 @@ static int max77686_clk_is_enabled(struct clk_hw *hw)
 static struct clk_ops max77686_clk_ops = {
 static struct clk_ops max77686_clk_ops = {
 	.prepare	= max77686_clk_prepare,
 	.prepare	= max77686_clk_prepare,
 	.unprepare	= max77686_clk_unprepare,
 	.unprepare	= max77686_clk_unprepare,
-	.is_enabled	= max77686_clk_is_enabled,
+	.is_prepared	= max77686_clk_is_prepared,
 };
 };
 
 
 static struct clk_init_data max77686_clks_init[MAX77686_CLKS_NUM] = {
 static struct clk_init_data max77686_clks_init[MAX77686_CLKS_NUM] = {