summaryrefslogtreecommitdiffstats
path: root/power-8916.c
diff options
context:
space:
mode:
authordianlujitao <dianlujitao@lineageos.org>2018-03-25 17:37:31 +0800
committerMichael Bestas <mkbestas@lineageos.org>2019-10-23 01:12:56 +0300
commit9cdea7baf4392d87cf0a55d24837f6fd0d6faa96 (patch)
tree5c6f009e502b1668031cb32637ee761aa960b581 /power-8916.c
parent71c7488ae10003c7d2f28fb68bd1188b1a426793 (diff)
downloadvendor_qcom_opensource_power-9cdea7baf4392d87cf0a55d24837f6fd0d6faa96.tar.gz
vendor_qcom_opensource_power-9cdea7baf4392d87cf0a55d24837f6fd0d6faa96.tar.bz2
vendor_qcom_opensource_power-9cdea7baf4392d87cf0a55d24837f6fd0d6faa96.zip
power: msm8916: Code clean up
* Minor cleanup * Remove unused varibles and checks Change-Id: I128953c2aa6a822d3950a872e50489b864e7a99c
Diffstat (limited to 'power-8916.c')
-rw-r--r--power-8916.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/power-8916.c b/power-8916.c
index 4bf8c0c..a8ed760 100644
--- a/power-8916.c
+++ b/power-8916.c
@@ -56,8 +56,6 @@ const char* scaling_min_freq[4] = {"/sys/devices/system/cpu/cpu0/cpufreq/scaling
"/sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq",
"/sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq"};
-static int slack_node_rw_failed = 0;
-
/**
* Returns true if the target is MSM8916.
*/
@@ -82,11 +80,11 @@ int power_hint_override(power_hint_t hint, void* data) {
int duration = 3000;
interaction(duration, ARRAY_SIZE(resources), resources);
- }
return HINT_HANDLED;
- case POWER_HINT_VIDEO_ENCODE: /* Do nothing for encode case */
+ }
+ case POWER_HINT_VIDEO_ENCODE: /* Do nothing for encode case */
return HINT_HANDLED;
- case POWER_HINT_VIDEO_DECODE: /*Do nothing for encode case */
+ case POWER_HINT_VIDEO_DECODE: /* Do nothing for decode case */
return HINT_HANDLED;
default:
return HINT_HANDLED;
@@ -97,8 +95,6 @@ int power_hint_override(power_hint_t hint, void* data) {
int set_interactive_override(int on) {
char governor[80];
char tmp_str[NODE_MAX];
- struct video_encode_metadata_t video_encode_metadata;
- int rc;
ALOGI("Got set_interactive hint");
if (get_scaling_governor_check_cores(governor, sizeof(governor), CPU0) == -1) {
@@ -133,10 +129,7 @@ int set_interactive_override(int on) {
if (sysfs_write(scaling_min_freq[1], tmp_str) != 0) {
if (sysfs_write(scaling_min_freq[2], tmp_str) != 0) {
if (sysfs_write(scaling_min_freq[3], tmp_str) != 0) {
- if (!slack_node_rw_failed) {
- ALOGE("Failed to write to %s", SCALING_MIN_FREQ);
- }
- rc = 1;
+ ALOGE("Failed to write to %s", SCALING_MIN_FREQ);
}
}
}
@@ -161,10 +154,7 @@ int set_interactive_override(int on) {
if (sysfs_write(scaling_min_freq[1], tmp_str) != 0) {
if (sysfs_write(scaling_min_freq[2], tmp_str) != 0) {
if (sysfs_write(scaling_min_freq[3], tmp_str) != 0) {
- if (!slack_node_rw_failed) {
- ALOGE("Failed to write to %s", SCALING_MIN_FREQ);
- }
- rc = 1;
+ ALOGE("Failed to write to %s", SCALING_MIN_FREQ);
}
}
}