linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PM / devfreq: tegra: Update governor to use devfreq_update_stats()
@ 2015-08-18  4:54 MyungJoo Ham
  2015-08-19 17:48 ` Javi Merino
  0 siblings, 1 reply; 2+ messages in thread
From: MyungJoo Ham @ 2015-08-18  4:54 UTC (permalink / raw)
  To: linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
  Cc: javi.merino-5wv7dgnIgG8@public.gmane.org,
	tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA


Direct invocation of get_dev_status() is no more recommended.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
---
 drivers/devfreq/tegra-devfreq.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/devfreq/tegra-devfreq.c b/drivers/devfreq/tegra-devfreq.c
index 13a1a6e..848b93e 100644
--- a/drivers/devfreq/tegra-devfreq.c
+++ b/drivers/devfreq/tegra-devfreq.c
@@ -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];
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-19 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-18  4:54 [PATCH] PM / devfreq: tegra: Update governor to use devfreq_update_stats() MyungJoo Ham
2015-08-19 17:48 ` Javi Merino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).