Commit af5d2856 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'hwmon-for-linus-v4.12-rc2' of...

Merge tag 'hwmon-for-linus-v4.12-rc2' of git://

Pull hwmon fix from Guenter Roeck:
 "Fix problem with hotplug state machine in coretemp driver"

* tag 'hwmon-for-linus-v4.12-rc2' of git://
  hwmon: (coretemp) Handle frozen hotplug state correctly
parents dac94e29 90b4f30b
......@@ -604,6 +604,13 @@ static int coretemp_cpu_online(unsigned int cpu)
struct cpuinfo_x86 *c = &cpu_data(cpu);
struct platform_data *pdata;
* Don't execute this on resume as the offline callback did
* not get executed on suspend.
if (cpuhp_tasks_frozen)
return 0;
* CPUID.06H.EAX[0] indicates whether the CPU has thermal
* sensors. We check this bit only, all the early CPUs
......@@ -654,6 +661,13 @@ static int coretemp_cpu_offline(unsigned int cpu)
struct temp_data *tdata;
int indx, target;
* Don't execute this on suspend as the device remove locks
* up the machine.
if (cpuhp_tasks_frozen)
return 0;
/* If the physical CPU device does not exist, just return */
if (!pdev)
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment