diff options
author | Diwakar Tundlam <dtundlam@nvidia.com> | 2014-03-24 17:51:00 -0700 |
---|---|---|
committer | Diwakar Tundlam <dtundlam@nvidia.com> | 2014-03-25 11:57:37 -0700 |
commit | 9950ef0f3e725ccd568dc96493278920e4df0d9b (patch) | |
tree | bb3e9eba7b2cf63e31a0a852086acf0519b0a3f6 /arch/arm/mach-tegra/tegra11_soctherm.c | |
parent | 2a1c02899674e20bcf59ea87ef3b574b0c6962e5 (diff) |
arm: tegra: soctherm: rename global array
Renamed global array of thermal zones to avoid masking formal argument
of same type in API functions. The argument to set_trip_temp() was
masked in the previous commit causing set_trip_temp via sysfs nodes to
crash.
Bug 1478989
Change-Id: I5dcc7b25e3fe8d66340a24088704e452ce0781da
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/385902
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'arch/arm/mach-tegra/tegra11_soctherm.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra11_soctherm.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm/mach-tegra/tegra11_soctherm.c b/arch/arm/mach-tegra/tegra11_soctherm.c index 01b533460773..d0e5c7c4ae58 100644 --- a/arch/arm/mach-tegra/tegra11_soctherm.c +++ b/arch/arm/mach-tegra/tegra11_soctherm.c @@ -587,7 +587,7 @@ static inline u32 temp_translate_rev(long temp) } #ifdef CONFIG_THERMAL -static struct thermal_zone_device *thz[THERM_SIZE]; +static struct thermal_zone_device *soctherm_th_zones[THERM_SIZE]; #endif struct soctherm_oc_irq_chip_data { int irq_base; @@ -937,7 +937,7 @@ static void soctherm_update_zone(int zn) long trip_temp, passive_low_temp = MAX_HIGH_TEMP, zone_temp; enum thermal_trip_type trip_type; struct thermal_trip_info *trip_state; - struct thermal_zone_device *cur_thz = thz[zn]; + struct thermal_zone_device *cur_thz = soctherm_th_zones[zn]; int count, trips; thermal_zone_device_update(cur_thz); @@ -991,7 +991,7 @@ static void soctherm_update(void) return; for (i = 0; i < THERM_SIZE; i++) { - if (thz[i] && thz[i]->trips) + if (soctherm_th_zones[i] && soctherm_th_zones[i]->trips) soctherm_update_zone(i); } } @@ -1386,7 +1386,7 @@ static int soctherm_set_trip_temp(struct thermal_zone_device *thz, } /* Allow SW to shutdown at 'Critical temperature reached' */ - thermal_notify_framework(&thz[thz->id], trip); + thermal_notify_framework(soctherm_th_zones[thz->id], trip); /* Reprogram HW thermtrip */ if (trip_state->trip_type == THERMAL_TRIP_CRITICAL) @@ -1615,15 +1615,15 @@ static int __init soctherm_thermal_sys_init(void) } snprintf(name, THERMAL_NAME_LENGTH, "%s-therm", therm_names[i]); - thz[i] = thermal_zone_device_register( - name, - therm->num_trips, - (1ULL << therm->num_trips) - 1, - therm, - &soctherm_ops, - therm->tzp, - therm->passive_delay, - 0); + soctherm_th_zones[i] = thermal_zone_device_register( + name, + therm->num_trips, + (1ULL << therm->num_trips) - 1, + therm, + &soctherm_ops, + therm->tzp, + therm->passive_delay, + 0); for (j = THROTTLE_OC1; !oc_en && j < THROTTLE_SIZE; j++) if ((therm2dev[i] != THROTTLE_DEV_NONE) && |