@@ -91,7 +91,7 @@ static int exynos_bus_get_event(struct exynos_bus *bus,
}
/*
- * Must necessary function for devfreq simple-ondemand governor
+ * devfreq function for both simple-ondemand and passive governor
*/
static int exynos_bus_target(struct device *dev, unsigned long *freq, u32 flags)
{
@@ -167,36 +167,6 @@ static void exynos_bus_exit(struct device *dev)
}
}
-/*
- * Must necessary function for devfreq passive governor
- */
-static int exynos_bus_passive_target(struct device *dev, unsigned long *freq,
- u32 flags)
-{
- struct exynos_bus *bus = dev_get_drvdata(dev);
- struct dev_pm_opp *new_opp;
- int ret;
-
- /* Get correct frequency for bus. */
- new_opp = devfreq_recommended_opp(dev, freq, flags);
- if (IS_ERR(new_opp)) {
- dev_err(dev, "failed to get recommended opp instance\n");
- return PTR_ERR(new_opp);
- }
-
- dev_pm_opp_put(new_opp);
-
- /* Change the frequency according to new OPP level */
- mutex_lock(&bus->lock);
- ret = dev_pm_opp_set_rate(dev, *freq);
- if (!ret)
- bus->curr_freq = *freq;
-
- mutex_unlock(&bus->lock);
-
- return ret;
-}
-
static void exynos_bus_passive_exit(struct device *dev)
{
struct exynos_bus *bus = dev_get_drvdata(dev);
@@ -417,7 +387,7 @@ static int exynos_bus_probe(struct platform_device *pdev)
goto out;
passive:
/* Initialize the struct profile and governor data for passive device */
- profile->target = exynos_bus_passive_target;
+ profile->target = exynos_bus_target;
profile->exit = exynos_bus_passive_exit;
/* Get the instance of parent devfreq device */
Both functions exynos_bus_passive_target() and exynos_bus_target() have the same code, so remove exynos_bus_passive_target(). In exynos_bus_probe() replace it with exynos_bus_target. Suggested-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Kamil Konieczny <k.konieczny@partner.samsung.com> --- This patch is new to this series. --- drivers/devfreq/exynos-bus.c | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-)