aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm75.c
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2014-12-09 11:37:35 +0800
committerZhang Rui <rui.zhang@intel.com>2014-12-09 11:37:35 +0800
commit9c1e4550b5cbe17ff68ce631356190ef9a565386 (patch)
tree04cd872bd8afd2b2fe143e2c17a180a39d1a275c /drivers/hwmon/lm75.c
parentLinux 3.18-rc7 (diff)
parentthermal: of: Extend current of-thermal.c code to allow setting emulated temp (diff)
downloadlinux-dev-9c1e4550b5cbe17ff68ce631356190ef9a565386.tar.xz
linux-dev-9c1e4550b5cbe17ff68ce631356190ef9a565386.zip
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into eduardo-soc-thermal
Diffstat (limited to 'drivers/hwmon/lm75.c')
-rw-r--r--drivers/hwmon/lm75.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index d16dbb33a531..e7c8bf9093ea 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -176,6 +176,10 @@ static struct attribute *lm75_attrs[] = {
};
ATTRIBUTE_GROUPS(lm75);
+static const struct thermal_zone_of_device_ops lm75_of_thermal_ops = {
+ .get_temp = lm75_read_temp,
+};
+
/*-----------------------------------------------------------------------*/
/* device probe and removal */
@@ -291,10 +295,9 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)
if (IS_ERR(data->hwmon_dev))
return PTR_ERR(data->hwmon_dev);
- data->tz = thermal_zone_of_sensor_register(data->hwmon_dev,
- 0,
+ data->tz = thermal_zone_of_sensor_register(data->hwmon_dev, 0,
data->hwmon_dev,
- lm75_read_temp, NULL);
+ &lm75_of_thermal_ops);
if (IS_ERR(data->tz))
data->tz = NULL;