]> err.no Git - linux-2.6/commit
HWMON: coretemp, suspend fix
authorRafael J. Wysocki <rjw@sisk.pl>
Mon, 3 Dec 2007 17:01:50 +0000 (18:01 +0100)
committerLen Brown <len.brown@intel.com>
Tue, 4 Dec 2007 06:35:32 +0000 (01:35 -0500)
commit561d9a969455cb009bb15b63e1d925dc527e7a9d
treec5465a27338ef4ca6cf0b554e86d0f2a880815d7
parent09b56adc98e0f8a21644fcb4d20ad367c3fceb55
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 <rjw@sisk.pl>
Acked-by: Mark M. Hoffman <mhoffman@lightlink.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/hwmon/coretemp.c