thermal/x86_pkg_temp: Sanitize callback (de)initialization
authorThomas Gleixner <tglx@linutronix.de>
Tue, 22 Nov 2016 17:57:06 +0000 (17:57 +0000)
committerZhang Rui <rui.zhang@intel.com>
Wed, 30 Nov 2016 02:24:53 +0000 (10:24 +0800)
commit09a674cd695f93bbbd09f24b5e13127c5907ef0c
tree4e56fb72ed3cfe805b851fc98f2e07a3da0e9b08
parent21a3d3d4c8f373054421443e244c75a94a40b1ae
thermal/x86_pkg_temp: Sanitize callback (de)initialization

The threshold callbacks are installed before the initialization of the
online cpus has succeeded and removed after the teardown has been
done. That's both wrong as callbacks might be invoked into a half
initialized or torn down state.

Move them to the proper places: Last in init() and first in exit().

While at it shorten the insane long and horrible named function names.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/x86_pkg_temp_thermal.c