PM / devfreq: tegra: Update governor to use devfreq_update_stats()
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 18 Aug 2015 04:47:41 +0000 (13:47 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 11 Sep 2015 05:23:30 +0000 (14:23 +0900)
Direct invocation of get_dev_status() is no more recommended.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/tegra-devfreq.c

index 13a1a6e..848b93e 100644 (file)
@@ -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];