aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/max6650.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/max6650.c')
-rw-r--r--drivers/hwmon/max6650.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c
index 8415664f33c2..755570c1f4eb 100644
--- a/drivers/hwmon/max6650.c
+++ b/drivers/hwmon/max6650.c
@@ -128,7 +128,7 @@ static struct i2c_driver max6650_driver = {
128struct max6650_data 128struct max6650_data
129{ 129{
130 struct i2c_client client; 130 struct i2c_client client;
131 struct class_device *class_dev; 131 struct device *hwmon_dev;
132 struct mutex update_lock; 132 struct mutex update_lock;
133 char valid; /* zero until following fields are valid */ 133 char valid; /* zero until following fields are valid */
134 unsigned long last_updated; /* in jiffies */ 134 unsigned long last_updated; /* in jiffies */
@@ -523,11 +523,11 @@ static int max6650_detect(struct i2c_adapter *adapter, int address, int kind)
523 if (err) 523 if (err)
524 goto err_detach; 524 goto err_detach;
525 525
526 data->class_dev = hwmon_device_register(&client->dev); 526 data->hwmon_dev = hwmon_device_register(&client->dev);
527 if (!IS_ERR(data->class_dev)) 527 if (!IS_ERR(data->hwmon_dev))
528 return 0; 528 return 0;
529 529
530 err = PTR_ERR(data->class_dev); 530 err = PTR_ERR(data->hwmon_dev);
531 dev_err(&client->dev, "error registering hwmon device.\n"); 531 dev_err(&client->dev, "error registering hwmon device.\n");
532 sysfs_remove_group(&client->dev.kobj, &max6650_attr_grp); 532 sysfs_remove_group(&client->dev.kobj, &max6650_attr_grp);
533err_detach: 533err_detach:
@@ -543,7 +543,7 @@ static int max6650_detach_client(struct i2c_client *client)
543 int err; 543 int err;
544 544
545 sysfs_remove_group(&client->dev.kobj, &max6650_attr_grp); 545 sysfs_remove_group(&client->dev.kobj, &max6650_attr_grp);
546 hwmon_device_unregister(data->class_dev); 546 hwmon_device_unregister(data->hwmon_dev);
547 err = i2c_detach_client(client); 547 err = i2c_detach_client(client);
548 if (!err) 548 if (!err)
549 kfree(data); 549 kfree(data);