summaryrefslogtreecommitdiffstats
path: root/power
diff options
context:
space:
mode:
authorKalimochoAz <calimochoazucarado@gmail.com>2012-09-01 03:15:04 +0200
committerZiyann <jaraidaniel@gmail.com>2014-11-14 09:07:01 +0100
commit74d3517bc52f16840917cb4dbfc374b120117ba3 (patch)
treea98d59a4ca1e18462b95e279f740381222447080 /power
parent2d25f375eff7487015f1b68c12f7292d7368b6cc (diff)
downloaddevice_samsung_tuna-74d3517bc52f16840917cb4dbfc374b120117ba3.zip
device_samsung_tuna-74d3517bc52f16840917cb4dbfc374b120117ba3.tar.gz
device_samsung_tuna-74d3517bc52f16840917cb4dbfc374b120117ba3.tar.bz2
Review power freq on screen off code
Review general code removed non sense comparation "on ?" since is extra Change-Id: I285368dbb449e4234e9cea8846c087fc4f3200f3
Diffstat (limited to 'power')
-rw-r--r--power/power_tuna.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/power/power_tuna.c b/power/power_tuna.c
index c5852d7..76f411e 100644
--- a/power/power_tuna.c
+++ b/power/power_tuna.c
@@ -145,13 +145,9 @@ static void tuna_power_set_interactive(struct power_module *module, int on)
if (len != -1 && strncmp(buf, screen_off_max_freq,
strlen(screen_off_max_freq)) != 0)
memcpy(scaling_max_freq, buf, sizeof(buf));
-
- sysfs_write("/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq",
- on ? scaling_max_freq : screen_off_max_freq);
- }
- else
- sysfs_write("/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq",
- on ? scaling_max_freq : screen_off_max_freq);
+ sysfs_write(SCALINGMAXFREQ_PATH, screen_off_max_freq);
+ } else
+ sysfs_write(SCALINGMAXFREQ_PATH, scaling_max_freq);
}
static void tuna_power_hint(struct power_module *module, power_hint_t hint,