aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/ntc_thermistor.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2015-06-29 10:37:23 -0700
committerKevin Hilman <khilman@linaro.org>2015-06-29 10:37:23 -0700
commit590e935df0c94b2d7a4584bb26906666176a6133 (patch)
treebb004c31d277423c7eb0f6bd2c0c1e9d8428e9f2 /drivers/hwmon/ntc_thermistor.c
parent774b195c03ac44c0dbc4e81a3f194779692ce3bd (diff)
parent91760bceff1f3f5860ff49c14194567f972352e6 (diff)
Diffstat (limited to 'drivers/hwmon/ntc_thermistor.c')
-rw-r--r--drivers/hwmon/ntc_thermistor.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
index 31597c504879..b2c90bdc2dd1 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -495,6 +495,10 @@ static const struct attribute_group ntc_attr_group = {
.attrs = ntc_attributes,
};
+static const struct thermal_zone_of_device_ops ntc_of_thermal_ops = {
+ .get_temp = ntc_read_temp,
+};
+
static int ntc_thermistor_probe(struct platform_device *pdev)
{
const struct of_device_id *of_id =
@@ -588,7 +592,7 @@ static int ntc_thermistor_probe(struct platform_device *pdev)
pdev_id->name);
data->tz = thermal_zone_of_sensor_register(data->dev, 0, data->dev,
- ntc_read_temp, NULL);
+ &ntc_of_thermal_ops);
if (IS_ERR(data->tz)) {
dev_dbg(&pdev->dev, "Failed to register to thermal fw.\n");
data->tz = NULL;