summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/tmp102.c
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2014-12-09 11:38:34 +0800
committerZhang Rui <rui.zhang@intel.com>2014-12-09 11:38:34 +0800
commitc89d99546dc5b076ccd6692c48ada9a92820a4ac (patch)
tree30788930f8c3fca80c0e5d8a377786d4a4a863bd /drivers/hwmon/tmp102.c
parent5a530ff0d88a366736ae4d1021e7358b52e55756 (diff)
parent9c1e4550b5cbe17ff68ce631356190ef9a565386 (diff)
downloadop-kernel-dev-c89d99546dc5b076ccd6692c48ada9a92820a4ac.zip
op-kernel-dev-c89d99546dc5b076ccd6692c48ada9a92820a4ac.tar.gz
Merge branch 'eduardo-soc-thermal' into thermal-soc
Diffstat (limited to 'drivers/hwmon/tmp102.c')
-rw-r--r--drivers/hwmon/tmp102.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hwmon/tmp102.c b/drivers/hwmon/tmp102.c
index 5171995..ba9f478 100644
--- a/drivers/hwmon/tmp102.c
+++ b/drivers/hwmon/tmp102.c
@@ -158,6 +158,10 @@ ATTRIBUTE_GROUPS(tmp102);
#define TMP102_CONFIG (TMP102_CONF_TM | TMP102_CONF_EM | TMP102_CONF_CR1)
#define TMP102_CONFIG_RD_ONLY (TMP102_CONF_R0 | TMP102_CONF_R1 | TMP102_CONF_AL)
+static const struct thermal_zone_of_device_ops tmp102_of_thermal_ops = {
+ .get_temp = tmp102_read_temp,
+};
+
static int tmp102_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
@@ -215,7 +219,7 @@ static int tmp102_probe(struct i2c_client *client,
}
tmp102->hwmon_dev = hwmon_dev;
tmp102->tz = thermal_zone_of_sensor_register(hwmon_dev, 0, hwmon_dev,
- tmp102_read_temp, NULL);
+ &tmp102_of_thermal_ops);
if (IS_ERR(tmp102->tz))
tmp102->tz = NULL;
OpenPOWER on IntegriCloud