power: Add PROFILE_MAX to enum

Change-Id: If7349c98598d346f5b03b32dceb5f797c8b02ce7
diff --git a/power/power.c b/power/power.c
index 66ad166..b4ddd67 100644
--- a/power/power.c
+++ b/power/power.c
@@ -57,7 +57,8 @@
 enum power_profile_e {
     PROFILE_POWER_SAVE = 0,
     PROFILE_BALANCED,
-    PROFILE_HIGH_PERFORMANCE
+    PROFILE_HIGH_PERFORMANCE,
+    PROFILE_MAX
 };
 static enum power_profile_e current_power_profile = PROFILE_BALANCED;
 
@@ -141,11 +142,15 @@
 }
 
 static void set_power_profile(struct samsung_power_module *samsung_pwr,
-                              enum power_profile_e profile)
+                              int profile)
 {
     int rc;
     struct stat sb;
 
+    if (profile < 0 || profile >= PROFILE_MAX) {
+        return;
+    }
+
     if (current_power_profile == profile) {
         return;
     }
@@ -404,7 +409,7 @@
                                feature_t feature)
 {
     if (feature == POWER_FEATURE_SUPPORTED_PROFILES) {
-        return 3;
+        return PROFILE_MAX;
     }
 
     return -1;