diff options
author | Zhang Rui <rui.zhang@intel.com> | 2014-12-09 11:37:35 +0800 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2014-12-09 11:37:35 +0800 |
commit | 9c1e4550b5cbe17ff68ce631356190ef9a565386 (patch) | |
tree | 04cd872bd8afd2b2fe143e2c17a180a39d1a275c /drivers/thermal/ti-soc-thermal/ti-thermal-common.c | |
parent | Linux 3.18-rc7 (diff) | |
parent | thermal: of: Extend current of-thermal.c code to allow setting emulated temp (diff) | |
download | linux-dev-9c1e4550b5cbe17ff68ce631356190ef9a565386.tar.xz linux-dev-9c1e4550b5cbe17ff68ce631356190ef9a565386.zip |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into eduardo-soc-thermal
Diffstat (limited to 'drivers/thermal/ti-soc-thermal/ti-thermal-common.c')
-rw-r--r-- | drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c index 9eec26dc0448..5fd03865e396 100644 --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c @@ -286,6 +286,11 @@ static int ti_thermal_get_crit_temp(struct thermal_zone_device *thermal, return ti_thermal_get_trip_temp(thermal, OMAP_TRIP_NUMBER - 1, temp); } +static const struct thermal_zone_of_device_ops ti_of_thermal_ops = { + .get_temp = __ti_thermal_get_temp, + .get_trend = __ti_thermal_get_trend, +}; + static struct thermal_zone_device_ops ti_thermal_ops = { .get_temp = ti_thermal_get_temp, .get_trend = ti_thermal_get_trend, @@ -333,8 +338,7 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id, /* in case this is specified by DT */ data->ti_thermal = thermal_zone_of_sensor_register(bgp->dev, id, - data, __ti_thermal_get_temp, - __ti_thermal_get_trend); + data, &ti_of_thermal_ops); if (IS_ERR(data->ti_thermal)) { /* Create thermal zone */ data->ti_thermal = thermal_zone_device_register(domain, |