Messages in this thread Patch in this message | | | From | jhbird.choi@gmail ... | Subject | [PATCH] PM / devfreq : Remove duplicate freq check code in exynos4_bus.c | Date | Tue, 3 Apr 2012 21:34:06 -0400 |
| |
From: Jonghwan Choi <jhbird.choi@samsung.com>
New freq & old freq is already checked before exynos42xx_set_busclk(). "if (old_freq == freq) return 0" is existed at the begin of a exynos4_bus_target().
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> --- drivers/devfreq/exynos4_bus.c | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c index 88ddc77..d94998c 100644 --- a/drivers/devfreq/exynos4_bus.c +++ b/drivers/devfreq/exynos4_bus.c @@ -648,18 +648,17 @@ static int exynos4_bus_target(struct device *dev, unsigned long *_freq, if (err) goto out; - if (old_freq != freq) { - switch (data->type) { - case TYPE_BUSF_EXYNOS4210: - err = exynos4210_set_busclk(data, opp); - break; - case TYPE_BUSF_EXYNOS4x12: - err = exynos4x12_set_busclk(data, opp); - break; - default: - err = -EINVAL; - } + switch (data->type) { + case TYPE_BUSF_EXYNOS4210: + err = exynos4210_set_busclk(data, opp); + break; + case TYPE_BUSF_EXYNOS4x12: + err = exynos4x12_set_busclk(data, opp); + break; + default: + err = -EINVAL; } + if (err) goto out; -- 1.7.0.4
| |