Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=561d9a969455cb009bb15b63e1d925dc527e7a9d Commit: 561d9a969455cb009bb15b63e1d925dc527e7a9d Parent: 09b56adc98e0f8a21644fcb4d20ad367c3fceb55 Author: Rafael J. Wysocki <[EMAIL PROTECTED]> AuthorDate: Mon Dec 3 18:01:50 2007 +0100 Committer: Len Brown <[EMAIL PROTECTED]> CommitDate: Tue Dec 4 01:35:32 2007 -0500
HWMON: coretemp, suspend fix It's not permitted to unregister a device after devices have been suspended. It causes deadlocks to appear on systems with coretemp hwmon loaded. To avoid this, we can make coretemp_cpu_callback() do nothing if the _FROZEN bit is set in action. Also, in other cases it's generally too late to unregister the coretemp device if the CPU is already dead, so it should be unregistered on CPU_DOWN_PREPARE. Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]> Acked-by: Mark M. Hoffman <[EMAIL PROTECTED]> Cc: Jiri Slaby <[EMAIL PROTECTED]> Cc: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Len Brown <[EMAIL PROTECTED]> --- drivers/hwmon/coretemp.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 5c82ec7..3ee60d2 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -337,11 +337,10 @@ static int coretemp_cpu_callback(struct notifier_block *nfb, switch (action) { case CPU_ONLINE: - case CPU_ONLINE_FROZEN: + case CPU_DOWN_FAILED: coretemp_device_add(cpu); break; - case CPU_DEAD: - case CPU_DEAD_FROZEN: + case CPU_DOWN_PREPARE: coretemp_device_remove(cpu); break; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html