Thermal: Fix DEFAULT_THERMAL_GOVERNOR
Zhang Rui [Wed, 12 Dec 2012 07:31:37 +0000 (15:31 +0800)]
Fix DEFAULT_THERMAL_GOVERNOR to be consistant with the
default governor selected in kernel config file.

Change-Id: Ied18b2c34b3c94e5da251afd42006d40c14346e0
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-on: http://git-master/r/196447
Tested-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

drivers/thermal/step_wise.c
include/linux/thermal.h

index 17c63f4..80a4d98 100644 (file)
@@ -176,7 +176,7 @@ static int step_wise_throttle(struct thermal_zone_device *tz, int trip)
 }
 
 static struct thermal_governor thermal_gov_step_wise = {
-       .name           = DEFAULT_THERMAL_GOVERNOR,
+       .name           = "step_wise",
        .throttle       = step_wise_throttle,
        .owner          = THIS_MODULE,
 };
index 3f4f0fe..ec3f6f5 100644 (file)
 #define THERMAL_GENL_VERSION                    0x01
 #define THERMAL_GENL_MCAST_GROUP_NAME           "thermal_mc_group"
 
-/* Default Thermal Governor: Does Linear Throttling */
-#define DEFAULT_THERMAL_GOVERNOR       "step_wise"
+/* Default Thermal Governor */
+#if defined(CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE)
+#define DEFAULT_THERMAL_GOVERNOR       "step_wise"
+#elif defined(CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE)
+#define DEFAULT_THERMAL_GOVERNOR       "fair_share"
+#elif defined(CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE)
+#define DEFAULT_THERMAL_GOVERNOR       "user_space"
+#endif
 
 struct thermal_zone_device;
 struct thermal_cooling_device;