aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/coretemp.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2017-06-01 13:53:55 -0400
committerBrian Norris <computersforpeace@gmail.com>2017-06-01 13:53:55 -0400
commit05e97a9eda72d58dba293857df6aac62584ef99a (patch)
treee86e692f26d4879ff2210c54722e2b7780210249 /drivers/hwmon/coretemp.c
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
parentd4ed3b9015b5eebc90d629579d9e7944607cbae5 (diff)
Merge tag 'nand/fixes-for-4.12-rc3' of git://git.infradead.org/linux-mtd into MTD
From Boris: """ This pull request contains several fixes to the core and the tango driver. tango fixes: * Add missing MODULE_DEVICE_TABLE() in tango_nand.c * Update the number of corrected bitflips core fixes: * Fix a long standing memory leak in nand_scan_tail() * Fix several bugs introduced by the per-vendor init/detection infrastructure (introduced in 4.12) * Add a static specifier to nand_ooblayout_lp_hamming_ops definition """
Diffstat (limited to 'drivers/hwmon/coretemp.c')
-rw-r--r--drivers/hwmon/coretemp.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 3ac4c03ba77b..c13a4fd86b3c 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -605,6 +605,13 @@ static int coretemp_cpu_online(unsigned int cpu)
605 struct platform_data *pdata; 605 struct platform_data *pdata;
606 606
607 /* 607 /*
608 * Don't execute this on resume as the offline callback did
609 * not get executed on suspend.
610 */
611 if (cpuhp_tasks_frozen)
612 return 0;
613
614 /*
608 * CPUID.06H.EAX[0] indicates whether the CPU has thermal 615 * CPUID.06H.EAX[0] indicates whether the CPU has thermal
609 * sensors. We check this bit only, all the early CPUs 616 * sensors. We check this bit only, all the early CPUs
610 * without thermal sensors will be filtered out. 617 * without thermal sensors will be filtered out.
@@ -654,6 +661,13 @@ static int coretemp_cpu_offline(unsigned int cpu)
654 struct temp_data *tdata; 661 struct temp_data *tdata;
655 int indx, target; 662 int indx, target;
656 663
664 /*
665 * Don't execute this on suspend as the device remove locks
666 * up the machine.
667 */
668 if (cpuhp_tasks_frozen)
669 return 0;
670
657 /* If the physical CPU device does not exist, just return */ 671 /* If the physical CPU device does not exist, just return */
658 if (!pdev) 672 if (!pdev)
659 return 0; 673 return 0;