Merge "msm: thermal: Update the hotplug initialization"

This commit is contained in:
Linux Build Service Account 2016-07-27 19:26:56 -07:00 committed by Gerrit - the friendly Code Review server
commit fafc905174

View file

@ -3615,7 +3615,7 @@ static int hotplug_init_cpu_offlined(void)
int temp = 0;
uint32_t cpu = 0;
if (!hotplug_enabled)
if (!hotplug_enabled || !hotplug_task)
return 0;
mutex_lock(&core_control_mutex);
@ -3632,8 +3632,7 @@ static int hotplug_init_cpu_offlined(void)
if (temp >= msm_thermal_info.hotplug_temp_degC)
cpus[cpu].offline = 1;
else if (temp <= (msm_thermal_info.hotplug_temp_degC -
msm_thermal_info.hotplug_temp_hysteresis_degC))
else
cpus[cpu].offline = 0;
}
mutex_unlock(&core_control_mutex);