aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ds1621.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/ds1621.c')
-rw-r--r--drivers/hwmon/ds1621.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c
index 1212d6b7f316..b7bd000b130f 100644
--- a/drivers/hwmon/ds1621.c
+++ b/drivers/hwmon/ds1621.c
@@ -73,7 +73,7 @@ static const u8 DS1621_REG_TEMP[3] = {
73/* Each client has this additional data */ 73/* Each client has this additional data */
74struct ds1621_data { 74struct ds1621_data {
75 struct i2c_client client; 75 struct i2c_client client;
76 struct class_device *class_dev; 76 struct device *hwmon_dev;
77 struct mutex update_lock; 77 struct mutex update_lock;
78 char valid; /* !=0 if following fields are valid */ 78 char valid; /* !=0 if following fields are valid */
79 unsigned long last_updated; /* In jiffies */ 79 unsigned long last_updated; /* In jiffies */
@@ -151,7 +151,7 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *da,
151 struct sensor_device_attribute *attr = to_sensor_dev_attr(da); 151 struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
152 struct i2c_client *client = to_i2c_client(dev); 152 struct i2c_client *client = to_i2c_client(dev);
153 struct ds1621_data *data = ds1621_update_client(dev); 153 struct ds1621_data *data = ds1621_update_client(dev);
154 u16 val = LM75_TEMP_TO_REG(simple_strtoul(buf, NULL, 10)); 154 u16 val = LM75_TEMP_TO_REG(simple_strtol(buf, NULL, 10));
155 155
156 mutex_lock(&data->update_lock); 156 mutex_lock(&data->update_lock);
157 data->temp[attr->index] = val; 157 data->temp[attr->index] = val;
@@ -266,9 +266,9 @@ static int ds1621_detect(struct i2c_adapter *adapter, int address,
266 if ((err = sysfs_create_group(&client->dev.kobj, &ds1621_group))) 266 if ((err = sysfs_create_group(&client->dev.kobj, &ds1621_group)))
267 goto exit_detach; 267 goto exit_detach;
268 268
269 data->class_dev = hwmon_device_register(&client->dev); 269 data->hwmon_dev = hwmon_device_register(&client->dev);
270 if (IS_ERR(data->class_dev)) { 270 if (IS_ERR(data->hwmon_dev)) {
271 err = PTR_ERR(data->class_dev); 271 err = PTR_ERR(data->hwmon_dev);
272 goto exit_remove_files; 272 goto exit_remove_files;
273 } 273 }
274 274
@@ -289,7 +289,7 @@ static int ds1621_detach_client(struct i2c_client *client)
289 struct ds1621_data *data = i2c_get_clientdata(client); 289 struct ds1621_data *data = i2c_get_clientdata(client);
290 int err; 290 int err;
291 291
292 hwmon_device_unregister(data->class_dev); 292 hwmon_device_unregister(data->hwmon_dev);
293 sysfs_remove_group(&client->dev.kobj, &ds1621_group); 293 sysfs_remove_group(&client->dev.kobj, &ds1621_group);
294 294
295 if ((err = i2c_detach_client(client))) 295 if ((err = i2c_detach_client(client)))