summaryrefslogtreecommitdiff
path: root/drivers/devfreq/exynos4_bus.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-03-17 21:52:09 +0100
committerRafael J. Wysocki <rjw@sisk.pl>2012-03-17 21:52:09 +0100
commit0f0cc1687d7e41ac59e4eaf057aa2fb9e48a9dd3 (patch)
treeb9f8e4d4fc2db4128d9f7281cb9ea21fdb969658 /drivers/devfreq/exynos4_bus.c
parent62dc7c02c31c2cc66c46cc8761d421c60bb07a6f (diff)
parentab5f299f51259fd2466cf35c89d79bd960e0fc32 (diff)
Merge branch 'pm-devfreq'
* pm-devfreq: PM / devfreq: add relation of recommended frequency.
Diffstat (limited to 'drivers/devfreq/exynos4_bus.c')
-rw-r--r--drivers/devfreq/exynos4_bus.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
index 590d6865e38..1a361e99965 100644
--- a/drivers/devfreq/exynos4_bus.c
+++ b/drivers/devfreq/exynos4_bus.c
@@ -619,13 +619,19 @@ static int exynos4_bus_setvolt(struct busfreq_data *data, struct opp *opp,
return err;
}
-static int exynos4_bus_target(struct device *dev, unsigned long *_freq)
+static int exynos4_bus_target(struct device *dev, unsigned long *_freq,
+ u32 flags)
{
int err = 0;
- struct busfreq_data *data = dev_get_drvdata(dev);
- struct opp *opp = devfreq_recommended_opp(dev, _freq);
- unsigned long old_freq = opp_get_freq(data->curr_opp);
+ struct platform_device *pdev = container_of(dev, struct platform_device,
+ dev);
+ struct busfreq_data *data = platform_get_drvdata(pdev);
+ struct opp *opp = devfreq_recommended_opp(dev, _freq, flags);
unsigned long freq = opp_get_freq(opp);
+ unsigned long old_freq = opp_get_freq(data->curr_opp);
+
+ if (IS_ERR(opp))
+ return PTR_ERR(opp);
if (old_freq == freq)
return 0;