aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm75.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/lm75.c')
-rw-r--r--drivers/hwmon/lm75.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index 4fa32205e44c..37a8cc032ffa 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -50,7 +50,7 @@ static const u8 LM75_REG_TEMP[3] = {
50/* Each client has this additional data */ 50/* Each client has this additional data */
51struct lm75_data { 51struct lm75_data {
52 struct i2c_client client; 52 struct i2c_client client;
53 struct class_device *class_dev; 53 struct device *hwmon_dev;
54 struct mutex update_lock; 54 struct mutex update_lock;
55 char valid; /* !=0 if following fields are valid */ 55 char valid; /* !=0 if following fields are valid */
56 unsigned long last_updated; /* In jiffies */ 56 unsigned long last_updated; /* In jiffies */
@@ -219,9 +219,9 @@ static int lm75_detect(struct i2c_adapter *adapter, int address, int kind)
219 if ((err = sysfs_create_group(&new_client->dev.kobj, &lm75_group))) 219 if ((err = sysfs_create_group(&new_client->dev.kobj, &lm75_group)))
220 goto exit_detach; 220 goto exit_detach;
221 221
222 data->class_dev = hwmon_device_register(&new_client->dev); 222 data->hwmon_dev = hwmon_device_register(&new_client->dev);
223 if (IS_ERR(data->class_dev)) { 223 if (IS_ERR(data->hwmon_dev)) {
224 err = PTR_ERR(data->class_dev); 224 err = PTR_ERR(data->hwmon_dev);
225 goto exit_remove; 225 goto exit_remove;
226 } 226 }
227 227
@@ -240,7 +240,7 @@ exit:
240static int lm75_detach_client(struct i2c_client *client) 240static int lm75_detach_client(struct i2c_client *client)
241{ 241{
242 struct lm75_data *data = i2c_get_clientdata(client); 242 struct lm75_data *data = i2c_get_clientdata(client);
243 hwmon_device_unregister(data->class_dev); 243 hwmon_device_unregister(data->hwmon_dev);
244 sysfs_remove_group(&client->dev.kobj, &lm75_group); 244 sysfs_remove_group(&client->dev.kobj, &lm75_group);
245 i2c_detach_client(client); 245 i2c_detach_client(client);
246 kfree(data); 246 kfree(data);