Instead of querying the use count, balanced number of enable/disable should be enforced across the system. Signed-off-by: Omar Ramirez Luna <omar.ramirez@xxxxxx> --- arch/arm/plat-omap/include/dspbridge/clk.h | 13 ------------- drivers/dsp/bridge/services/clk.c | 23 ----------------------- 2 files changed, 0 insertions(+), 36 deletions(-) diff --git a/arch/arm/plat-omap/include/dspbridge/clk.h b/arch/arm/plat-omap/include/dspbridge/clk.h index 5f7a925..621d08f 100644 --- a/arch/arm/plat-omap/include/dspbridge/clk.h +++ b/arch/arm/plat-omap/include/dspbridge/clk.h @@ -117,17 +117,4 @@ extern dsp_status dsp_clk_get_rate(IN enum dsp_clk_id clk_id, extern void ssi_clk_prepare(bool FLAG); -/* - * ======== CLK_Get_RefCnt ======== - * Purpose: - * get the reference count for the clock. - * Parameters: - * Returns: - * s32: Reference Count for the clock. - * -EPERM: Error occured while getting the reference count of a clock. - * Requires: - * Ensures: - */ -extern s32 clk_get_use_cnt(IN enum dsp_clk_id clk_id); - #endif /* _SYNC_H */ diff --git a/drivers/dsp/bridge/services/clk.c b/drivers/dsp/bridge/services/clk.c index b4f5709..e447d54 100644 --- a/drivers/dsp/bridge/services/clk.c +++ b/drivers/dsp/bridge/services/clk.c @@ -179,20 +179,11 @@ dsp_status dsp_clk_disable(IN enum dsp_clk_id clk_id) { dsp_status status = DSP_SOK; struct clk *clk_handle; - s32 clk_use_cnt; DBC_REQUIRE(clk_id < DSP_CLK_NOT_DEFINED); clk_handle = dsp_clks[clk_id].clk_handle; - clk_use_cnt = clk_get_use_cnt(clk_id); - if (clk_use_cnt == -1) { - pr_err("%s: failed to get CLK Use count for CLK %s, CLK dev id" - " = %d\n", __func__, dsp_clks[clk_id].clk_name, - dsp_clks[clk_id].id); - } else if (clk_use_cnt == 0) { - return status; - } if (clk_id == DSP_CLK_SSI_ICK) ssi_clk_prepare(false); @@ -226,20 +217,6 @@ dsp_status dsp_clk_get_rate(IN enum dsp_clk_id clk_id, u32 *speedKhz) return status; } -s32 clk_get_use_cnt(IN enum dsp_clk_id clk_id) -{ - struct clk *clk_handle; - s32 use_count = -1; - DBC_REQUIRE(clk_id < DSP_CLK_NOT_DEFINED); - - clk_handle = dsp_clks[clk_id].clk_handle; - - /* FIXME: usecount shouldn't be used */ - use_count = clk_handle->usecount; - - return use_count; -} - void ssi_clk_prepare(bool FLAG) { void __iomem *ssi_base; -- 1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html