aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/tmp102.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2015-06-16 15:29:36 -0700
committerKevin Hilman <khilman@linaro.org>2015-06-16 15:29:36 -0700
commitb0477f5f8ec85bf8a82f6aa6eee308d72c418032 (patch)
treed520be10a261f418dbf4539f1d2b5d48d74ba0d3 /drivers/hwmon/tmp102.c
parent13a29d9ad242f0bf3b31afe812c81558d54892de (diff)
parent9a004a75a3305fbd3c253f38cd0788164c4fbd56 (diff)
Merge branch 'linux-linaro-lsk-v3.18' into linux-linaro-lsk-v3.18-androidlsk-v3.18-15.07-android
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 51719956cc03..ba9f478f64ee 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;