diff options
Diffstat (limited to 'drivers/hwmon/tmp102.c')
-rw-r--r-- | drivers/hwmon/tmp102.c | 6 |
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); | |||
158 | #define TMP102_CONFIG (TMP102_CONF_TM | TMP102_CONF_EM | TMP102_CONF_CR1) | 158 | #define TMP102_CONFIG (TMP102_CONF_TM | TMP102_CONF_EM | TMP102_CONF_CR1) |
159 | #define TMP102_CONFIG_RD_ONLY (TMP102_CONF_R0 | TMP102_CONF_R1 | TMP102_CONF_AL) | 159 | #define TMP102_CONFIG_RD_ONLY (TMP102_CONF_R0 | TMP102_CONF_R1 | TMP102_CONF_AL) |
160 | 160 | ||
161 | static const struct thermal_zone_of_device_ops tmp102_of_thermal_ops = { | ||
162 | .get_temp = tmp102_read_temp, | ||
163 | }; | ||
164 | |||
161 | static int tmp102_probe(struct i2c_client *client, | 165 | static int tmp102_probe(struct i2c_client *client, |
162 | const struct i2c_device_id *id) | 166 | const struct i2c_device_id *id) |
163 | { | 167 | { |
@@ -215,7 +219,7 @@ static int tmp102_probe(struct i2c_client *client, | |||
215 | } | 219 | } |
216 | tmp102->hwmon_dev = hwmon_dev; | 220 | tmp102->hwmon_dev = hwmon_dev; |
217 | tmp102->tz = thermal_zone_of_sensor_register(hwmon_dev, 0, hwmon_dev, | 221 | tmp102->tz = thermal_zone_of_sensor_register(hwmon_dev, 0, hwmon_dev, |
218 | tmp102_read_temp, NULL); | 222 | &tmp102_of_thermal_ops); |
219 | if (IS_ERR(tmp102->tz)) | 223 | if (IS_ERR(tmp102->tz)) |
220 | tmp102->tz = NULL; | 224 | tmp102->tz = NULL; |
221 | 225 | ||