fix cpufreq poll - it kepts saying there is a new freq, making the

animator spin etc. etc.



SVN revision: 55533
This commit is contained in:
Carsten Haitzler 2010-12-13 08:04:10 +00:00
parent 2425078e6f
commit d439ed5515
1 changed files with 6 additions and 2 deletions

View File

@ -713,16 +713,20 @@ _cpufreq_status_check_current(Status *s)
f = fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor", "r");
if (f)
{
char *p;
buf[0] = 0;
fgets(buf, sizeof(buf), f);
buf[sizeof(buf) - 1] = 0;
fclose(f);
for (p = buf; (*p != 0) && (isalnum(*p)); p++);
*p = 0;
if ((!s->cur_governor) || (strcmp(buf, s->cur_governor)))
{
ret = 1;
if (s->cur_governor)
free(s->cur_governor);
if (s->cur_governor) free(s->cur_governor);
s->cur_governor = strdup(buf);
for (i = strlen(s->cur_governor) - 1; i >= 0; i--)