diff options
| -rw-r--r-- | arch/i386/kernel/cpu/mcheck/therm_throt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/i386/kernel/cpu/mcheck/therm_throt.c b/arch/i386/kernel/cpu/mcheck/therm_throt.c index 7ba7c3abd3a4..1203dc5ab87a 100644 --- a/arch/i386/kernel/cpu/mcheck/therm_throt.c +++ b/arch/i386/kernel/cpu/mcheck/therm_throt.c | |||
| @@ -134,19 +134,21 @@ static __cpuinit int thermal_throttle_cpu_callback(struct notifier_block *nfb, | |||
| 134 | int err; | 134 | int err; |
| 135 | 135 | ||
| 136 | sys_dev = get_cpu_sysdev(cpu); | 136 | sys_dev = get_cpu_sysdev(cpu); |
| 137 | mutex_lock(&therm_cpu_lock); | ||
| 138 | switch (action) { | 137 | switch (action) { |
| 139 | case CPU_ONLINE: | 138 | case CPU_ONLINE: |
| 140 | case CPU_ONLINE_FROZEN: | 139 | case CPU_ONLINE_FROZEN: |
| 140 | mutex_lock(&therm_cpu_lock); | ||
| 141 | err = thermal_throttle_add_dev(sys_dev); | 141 | err = thermal_throttle_add_dev(sys_dev); |
| 142 | mutex_unlock(&therm_cpu_lock); | ||
| 142 | WARN_ON(err); | 143 | WARN_ON(err); |
| 143 | break; | 144 | break; |
| 144 | case CPU_DEAD: | 145 | case CPU_DEAD: |
| 145 | case CPU_DEAD_FROZEN: | 146 | case CPU_DEAD_FROZEN: |
| 147 | mutex_lock(&therm_cpu_lock); | ||
| 146 | thermal_throttle_remove_dev(sys_dev); | 148 | thermal_throttle_remove_dev(sys_dev); |
| 149 | mutex_unlock(&therm_cpu_lock); | ||
| 147 | break; | 150 | break; |
| 148 | } | 151 | } |
| 149 | mutex_unlock(&therm_cpu_lock); | ||
| 150 | return NOTIFY_OK; | 152 | return NOTIFY_OK; |
| 151 | } | 153 | } |
| 152 | 154 | ||
