lkml.org 
[lkml]   [2012]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] PM: Devfreq: fix userspace governor frequency bug
Date
The frequency set by userspace governor may not the
same as the final frequency. If this condition happens,
then "cat set_freq" will return a wrong value which is
inconsistant with the real frequency.

This patch updates data->user_frequency after calling
of update_devfreq. use devfreq->revious_freq as the
final user_frequency.

Signed-off-by: Xiaoguang Chen <chenxg@marvell.com>
---
drivers/devfreq/governor_userspace.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/devfreq/governor_userspace.c b/drivers/devfreq/governor_userspace.c
index 0681246..85ad80a 100644
--- a/drivers/devfreq/governor_userspace.c
+++ b/drivers/devfreq/governor_userspace.c
@@ -59,6 +59,7 @@ static ssize_t store_freq(struct device *dev, struct device_attribute *attr,
err = update_devfreq(devfreq);
if (err == 0)
err = count;
+ data->user_frequency = devfreq->previous_freq;
mutex_unlock(&devfreq->lock);
return err;
}
--
1.7.0.4


\
 
 \ /
  Last update: 2012-07-03 12:01    [W:3.137 / U:0.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site