diff options
author | ume <ume@FreeBSD.org> | 2005-08-18 16:41:25 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2005-08-18 16:41:25 +0000 |
commit | d72dbf2615f0bc4b8462056a71521522cbff04ea (patch) | |
tree | e8a8e9fae7167c823ad05a627ede41ba44aff4e8 | |
parent | 57562e06189e2138c901b6b57b5bbf448c3f1750 (diff) | |
download | FreeBSD-src-d72dbf2615f0bc4b8462056a71521522cbff04ea.zip FreeBSD-src-d72dbf2615f0bc4b8462056a71521522cbff04ea.tar.gz |
- don't forget to save freqency when priority is raised.
- nuke redundant variable initialization.
-rw-r--r-- | sys/kern/kern_cpu.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/kern_cpu.c b/sys/kern/kern_cpu.c index e75092f..4c22fb6 100644 --- a/sys/kern/kern_cpu.c +++ b/sys/kern/kern_cpu.c @@ -260,8 +260,7 @@ cf_set_method(device_t dev, const struct cf_level *level, int priority) if (CPUFREQ_CMP(sc->curr_level.total_set.freq, level->total_set.freq)) { CF_DEBUG("skipping freq %d, same as current level %d\n", level->total_set.freq, sc->curr_level.total_set.freq); - sc->curr_priority = priority; - goto out; + goto skip; } /* First, set the absolute frequency via its driver. */ @@ -323,6 +322,7 @@ cf_set_method(device_t dev, const struct cf_level *level, int priority) } } +skip: /* If we were restoring a saved state, reset it to "unused". */ if (level == &sc->saved_level) { CF_DEBUG("resetting saved level\n"); @@ -345,7 +345,6 @@ cf_set_method(device_t dev, const struct cf_level *level, int priority) } sc->curr_level = *level; sc->curr_priority = priority; - error = 0; out: CF_MTX_UNLOCK(&sc->lock); |