Skip to content

Commit

Permalink
PM / devfreq: tegra: Update governor to use devfreq_update_stats()
Browse files Browse the repository at this point in the history
Direct invocation of get_dev_status() is no more recommended.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
  • Loading branch information
MyungJoo Ham committed Sep 11, 2015
1 parent d54cdf3 commit 14de390
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/devfreq/tegra-devfreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,18 +541,20 @@ static struct devfreq_dev_profile tegra_devfreq_profile = {
static int tegra_governor_get_target(struct devfreq *devfreq,
unsigned long *freq)
{
struct devfreq_dev_status stat;
struct devfreq_dev_status *stat;
struct tegra_devfreq *tegra;
struct tegra_devfreq_device *dev;
unsigned long target_freq = 0;
unsigned int i;
int err;

err = devfreq->profile->get_dev_status(devfreq->dev.parent, &stat);
err = devfreq_update_stats(devfreq);
if (err)
return err;

tegra = stat.private_data;
stat = &devfreq->last_status;

tegra = stat->private_data;

for (i = 0; i < ARRAY_SIZE(tegra->devices); i++) {
dev = &tegra->devices[i];
Expand Down

0 comments on commit 14de390

Please sign in to comment.