thermal: soctherm: use zone_enable for DT case
Santosh Katvate [Wed, 2 Dec 2015 09:45:34 +0000 (14:45 +0530)]
therm->tz is populated only in non-DT case.
So Use zone_enable to decide if thermal zone is disabled in DT case.

Bug 200157257

Change-Id: I5fd679fe7c4aad76231c82bd8cc7d94c3971cff4
Signed-off-by: Santosh Katvate <skatvate@nvidia.com>
Reviewed-on: http://git-master/r/840993
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

drivers/platform/tegra/tegra_soctherm.c

index d5bda82..5843301 100644 (file)
@@ -2497,7 +2497,7 @@ static void soctherm_tsense_program(enum soctherm_sense sensor,
                return;
 
        therm = &pp->therm[tz_id];
-       if (!therm->tz) {
+       if (!(therm->tz || therm->zone_enable)) {
                pr_info("soctherm: skipping sensor %d programming\n", sensor);
                return;
        }