thermal: intel: int340x: processor_thermal_device: simplify to get driver data
authorSumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Mon, 15 Apr 2019 14:48:30 +0000 (20:18 +0530)
committerZhang Rui <rui.zhang@intel.com>
Mon, 22 Apr 2019 08:51:28 +0000 (16:51 +0800)
commit1948d498dcf680bc650391f23da2f97e59f9126d
treef149b7c5eb688d541d11d81f8260c9ac42633b5d
parent6eb61a9361951e466628bcb0abaf0a197181ec97
thermal: intel: int340x: processor_thermal_device: simplify to get driver data

This simplifies getting the 'driver_data' from 'struct device' directly.
Going through platform_device or pci_dev is not required. Also removes
condition check as the private data stored with dev pointer, means
irrespective of enumeration mode, we can use dev_get_drvdata().
This removes the unnecessary step back and forth.

Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c