From 8d2810abe5b48c1007c730244b5bb76f9f66a278 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Thu, 29 Nov 2012 09:55:33 +0800 Subject: [PATCH] rk: dvfs: never call clk_notifier_unregister when not call clk_notifier_register --- arch/arm/mach-rk2928/dvfs.c | 7 +++---- arch/arm/mach-rk30/dvfs.c | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-rk2928/dvfs.c b/arch/arm/mach-rk2928/dvfs.c index d9c27df6421c..f3b669a080f2 100644 --- a/arch/arm/mach-rk2928/dvfs.c +++ b/arch/arm/mach-rk2928/dvfs.c @@ -60,9 +60,6 @@ static LIST_HEAD(rk_dvfs_tree); static DEFINE_MUTEX(mutex); static DEFINE_MUTEX(rk_dvfs_mutex); -extern int rk30_clk_notifier_register(struct clk *clk, struct notifier_block *nb); -extern int rk30_clk_notifier_unregister(struct clk *clk, struct notifier_block *nb); - static int dump_dbg_map(char* buf); #define PD_ON 1 @@ -441,8 +438,10 @@ int clk_disable_dvfs(struct clk *clk) dvfs_clk->enable_dvfs--; if (0 == dvfs_clk->enable_dvfs) { DVFS_ERR("clk closed!\n"); - rk30_clk_notifier_unregister(clk, dvfs_clk->dvfs_nb); +#if 0 + clk_notifier_unregister(clk, dvfs_clk->dvfs_nb); DVFS_DBG("clk unregister nb!\n"); +#endif } } return 0; diff --git a/arch/arm/mach-rk30/dvfs.c b/arch/arm/mach-rk30/dvfs.c index faf977f574c0..3b72985c8c97 100755 --- a/arch/arm/mach-rk30/dvfs.c +++ b/arch/arm/mach-rk30/dvfs.c @@ -60,9 +60,6 @@ static LIST_HEAD(rk_dvfs_tree); static DEFINE_MUTEX(mutex); static DEFINE_MUTEX(rk_dvfs_mutex); -extern int rk30_clk_notifier_register(struct clk *clk, struct notifier_block *nb); -extern int rk30_clk_notifier_unregister(struct clk *clk, struct notifier_block *nb); - static int dump_dbg_map(char* buf); #define PD_ON 1 @@ -441,8 +438,10 @@ int clk_disable_dvfs(struct clk *clk) dvfs_clk->enable_dvfs--; if (0 == dvfs_clk->enable_dvfs) { DVFS_ERR("clk closed!\n"); - rk30_clk_notifier_unregister(clk, dvfs_clk->dvfs_nb); +#if 0 + clk_notifier_unregister(clk, dvfs_clk->dvfs_nb); DVFS_DBG("clk unregister nb!\n"); +#endif } } return 0; -- 2.34.1