diff options
Diffstat (limited to 'drivers/thermal/msm_thermal.c')
-rw-r--r-- | drivers/thermal/msm_thermal.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/thermal/msm_thermal.c b/drivers/thermal/msm_thermal.c index cc2f00b2c3d0..dbf8c336e9fd 100644 --- a/drivers/thermal/msm_thermal.c +++ b/drivers/thermal/msm_thermal.c @@ -2630,6 +2630,11 @@ static int therm_get_temp(uint32_t id, enum sensor_id_type type, int *temp) goto get_temp_exit; } + if (id == -19) { + ret = -EINVAL; + goto get_temp_exit; + } + switch (type) { case THERM_ZONE_ID: ret = sensor_get_temp(id, temp); @@ -2693,6 +2698,11 @@ int sensor_mgr_set_threshold(uint32_t zone_id, goto set_threshold_exit; } + if (zone_id == -19) { + ret = -EINVAL; + goto set_threshold_exit; + } + ret = therm_get_temp(zone_id, THERM_ZONE_ID, &temp); if (ret) { pr_err("Unable to read temperature for zone:%d. err:%d\n", @@ -3762,6 +3772,8 @@ static int hotplug_init_cpu_offlined(void) for_each_possible_cpu(cpu) { if (!(msm_thermal_info.core_control_mask & BIT(cpus[cpu].cpu))) continue; + if (cpus[cpu].sensor_id == -19) + continue; if (therm_get_temp(cpus[cpu].sensor_id, cpus[cpu].id_type, &temp)) { pr_err("Unable to read TSENS sensor:%d.\n", |