[PATCH] PM / devfreq : Remove duplicate freq check code in exynos4_bus.c

From: jhbird . choi
Date: Tue Apr 03 2012 - 21:34:50 EST


From: Jonghwan Choi <jhbird.choi@xxxxxxxxxxx>

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@xxxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/