Blame thermald-1.6-fix_typo_on_field_name_default_prefernce.patch

5edf9f
From 8f7d49be960dd19edaef452a89b541e4509caef7 Mon Sep 17 00:00:00 2001
5edf9f
From: Colin Ian King <colin.king@canonical.com>
5edf9f
Date: Tue, 18 Apr 2017 17:16:09 +0100
5edf9f
Subject: [PATCH] fix typo on field name default_prefernce
5edf9f
5edf9f
Fix typo, default_prefernce should be default_preference
5edf9f
5edf9f
Signed-off-by: Colin Ian King <colin.king@canonical.com>
5edf9f
---
5edf9f
 src/thd_parse.cpp | 10 +++++-----
5edf9f
 src/thd_parse.h   |  2 +-
5edf9f
 2 files changed, 6 insertions(+), 6 deletions(-)
5edf9f
5edf9f
diff --git a/src/thd_parse.cpp b/src/thd_parse.cpp
5edf9f
index e96f9d0..b2828d1 100644
5edf9f
--- a/src/thd_parse.cpp
5edf9f
+++ b/src/thd_parse.cpp
5edf9f
@@ -467,7 +467,7 @@ int cthd_parse::parse_new_platform_info(xmlNode * a_node, xmlDoc *doc,
5edf9f
 	xmlNode *cur_node = NULL;
5edf9f
 	char *tmp_value;
5edf9f
 
5edf9f
-	info_ptr->default_prefernce = PREF_ENERGY_CONSERVE;
5edf9f
+	info_ptr->default_preference = PREF_ENERGY_CONSERVE;
5edf9f
 
5edf9f
 	for (cur_node = a_node; cur_node; cur_node = cur_node->next) {
5edf9f
 		if (cur_node->type == XML_ELEMENT_NODE) {
5edf9f
@@ -488,9 +488,9 @@ int cthd_parse::parse_new_platform_info(xmlNode * a_node, xmlDoc *doc,
5edf9f
 					"Preference")) {
5edf9f
 				char *pref_val = char_trim(tmp_value);
5edf9f
 				if (pref_val && !strcasecmp(pref_val, "PERFORMANCE"))
5edf9f
-					info_ptr->default_prefernce = PREF_PERFORMANCE;
5edf9f
+					info_ptr->default_preference = PREF_PERFORMANCE;
5edf9f
 				else
5edf9f
-					info_ptr->default_prefernce = PREF_ENERGY_CONSERVE;
5edf9f
+					info_ptr->default_preference = PREF_ENERGY_CONSERVE;
5edf9f
 			} else if (!strcasecmp((const char*) cur_node->name,
5edf9f
 					"ThermalZones")) {
5edf9f
 				parse_thermal_zones(cur_node->children, doc, info_ptr);
5edf9f
@@ -592,7 +592,7 @@ void cthd_parse::dump_thermal_conf() {
5edf9f
 		thd_log_info(" *** Index %u ***\n", i);
5edf9f
 		thd_log_info("Name: %s\n", thermal_info_list[i].name.c_str());
5edf9f
 		thd_log_info("UUID: %s\n", thermal_info_list[i].uuid.c_str());
5edf9f
-		thd_log_info("type: %d\n", thermal_info_list[i].default_prefernce);
5edf9f
+		thd_log_info("type: %d\n", thermal_info_list[i].default_preference);
5edf9f
 
5edf9f
 		for (unsigned int j = 0; j < thermal_info_list[i].sensors.size(); ++j) {
5edf9f
 			thd_log_info("\tSensor %u \n", j);
5edf9f
@@ -807,7 +807,7 @@ int cthd_parse::set_default_preference() {
5edf9f
 	cthd_preference thd_pref;
5edf9f
 	int ret;
5edf9f
 
5edf9f
-	if (thermal_info_list[matched_thermal_info_index].default_prefernce
5edf9f
+	if (thermal_info_list[matched_thermal_info_index].default_preference
5edf9f
 			== PREF_PERFORMANCE)
5edf9f
 		ret = thd_pref.set_preference("PERFORMANCE");
5edf9f
 	else
5edf9f
diff --git a/src/thd_parse.h b/src/thd_parse.h
5edf9f
index 3b19a8e..6d7e890 100644
5edf9f
--- a/src/thd_parse.h
5edf9f
+++ b/src/thd_parse.h
5edf9f
@@ -115,7 +115,7 @@ typedef struct {
5edf9f
 	std::string name;
5edf9f
 	std::string uuid;
5edf9f
 	std::string product_name;
5edf9f
-	int default_prefernce;
5edf9f
+	int default_preference;
5edf9f
 	std::vector<thermal_sensor_t> sensors;
5edf9f
 	std::vector<thermal_zone_t> zones;
5edf9f
 	std::vector<cooling_dev_t> cooling_devs;