power: Introduce is_ondemand_governor and is_msmdcvs_governor
* Don't copy paste the same governor check code multiple times
Change-Id: I1586a764ee617814c18fc68bf1aef868c480fe83
diff --git a/utils.c b/utils.c
index 5f950a1..49a1c97 100644
--- a/utils.c
+++ b/utils.c
@@ -216,6 +216,18 @@
return 0;
}
+int is_ondemand_governor(char* governor) {
+ if (strncmp(governor, ONDEMAND_GOVERNOR, (strlen(ONDEMAND_GOVERNOR)+1)) == 0)
+ return 1;
+ return 0;
+}
+
+int is_msmdcvs_governor(char* governor) {
+ if (strncmp(governor, MSMDCVS_GOVERNOR, (strlen(MSMDCVS_GOVERNOR)+1)) == 0)
+ return 1;
+ return 0;
+}
+
#ifndef INTERACTION_BOOST
void interaction(int UNUSED(duration), int UNUSED(num_args), int UNUSED(opt_list[]))
{