thermal/x86_pkg_temp: Remove redundant package search
authorThomas Gleixner <tglx@linutronix.de>
Tue, 22 Nov 2016 17:57:05 +0000 (17:57 +0000)
committerZhang Rui <rui.zhang@intel.com>
Wed, 30 Nov 2016 02:24:38 +0000 (10:24 +0800)
commit89baa56be7fad333db0a91198bf4026017ab737d
treea9154ef268c1f2fda4a7a8f89c899a3a52fa993f
parent768bd13c93c043a7793dca6d98ba75572bb9b956
thermal/x86_pkg_temp: Remove redundant package search

In pkg_temp_thermal_device_remove() the package device is searched at the
beginning of the function. When the device refcount becomes zero another
search for the same device is conducted. Remove the pointless loop and use
the device pointer which was retrieved at the beginning of the function.

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