aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ntc_thermistor.c
diff options
context:
space:
mode:
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 fd9a945fe8db..112e4d45e4a0 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -486,6 +486,10 @@ static const struct attribute_group ntc_attr_group = {
486 .attrs = ntc_attributes, 486 .attrs = ntc_attributes,
487}; 487};
488 488
489static const struct thermal_zone_of_device_ops ntc_of_thermal_ops = {
490 .get_temp = ntc_read_temp,
491};
492
489static int ntc_thermistor_probe(struct platform_device *pdev) 493static int ntc_thermistor_probe(struct platform_device *pdev)
490{ 494{
491 const struct of_device_id *of_id = 495 const struct of_device_id *of_id =
@@ -579,7 +583,7 @@ static int ntc_thermistor_probe(struct platform_device *pdev)
579 pdev_id->name); 583 pdev_id->name);
580 584
581 data->tz = thermal_zone_of_sensor_register(data->dev, 0, data->dev, 585 data->tz = thermal_zone_of_sensor_register(data->dev, 0, data->dev,
582 ntc_read_temp, NULL); 586 &ntc_of_thermal_ops);
583 if (IS_ERR(data->tz)) { 587 if (IS_ERR(data->tz)) {
584 dev_dbg(&pdev->dev, "Failed to register to thermal fw.\n"); 588 dev_dbg(&pdev->dev, "Failed to register to thermal fw.\n");
585 data->tz = NULL; 589 data->tz = NULL;