diff options
Diffstat (limited to 'power-8953.c')
-rw-r--r-- | power-8953.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/power-8953.c b/power-8953.c index 2525d7a..bd10669 100644 --- a/power-8953.c +++ b/power-8953.c @@ -122,8 +122,7 @@ int set_interactive_override(int on) { if (!on) { /* Display off. */ - if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { + if (is_interactive_governor(governor)) { /* timer rate - 40mS*/ int resource_values[] = { 0x41424000, @@ -138,8 +137,7 @@ int set_interactive_override(int on) { } else { /* Display on. */ - if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { + if (is_interactive_governor(governor)) { undo_hint_action(DISPLAY_STATE_HINT_ID); display_hint_sent = 0; } @@ -211,8 +209,7 @@ static void process_video_encode_hint(void* metadata) { } if (video_encode_metadata.state == 1) { - if ((strncmp(governor, SCHEDUTIL_GOVERNOR, strlen(SCHEDUTIL_GOVERNOR)) == 0) && - (strlen(governor) == strlen(SCHEDUTIL_GOVERNOR))) { + if (is_schedutil_governor(governor)) { if (is_target_SDM632()) { /* sample_ms = 10mS * SLB for Core0 = -6 @@ -253,8 +250,7 @@ static void process_video_encode_hint(void* metadata) { } } } - } else if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { + } else if (is_interactive_governor(governor)) { /* Sched_load and migration_notification disable * timer rate - 40mS*/ int res[] = { @@ -272,10 +268,7 @@ static void process_video_encode_hint(void* metadata) { } } } else if (video_encode_metadata.state == 0) { - if (((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) || - ((strncmp(governor, SCHEDUTIL_GOVERNOR, strlen(SCHEDUTIL_GOVERNOR)) == 0) && - (strlen(governor) == strlen(SCHEDUTIL_GOVERNOR)))) { + if (is_interactive_governor(governor) || is_schedutil_governor(governor)) { camera_hint_ref_count--; if (!camera_hint_ref_count) { undo_hint_action(video_encode_metadata.hint_id); |