aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/gl520sm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/gl520sm.c')
-rw-r--r--drivers/hwmon/gl520sm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/gl520sm.c b/drivers/hwmon/gl520sm.c
index ebe7b9aaa916..a3b56c816e11 100644
--- a/drivers/hwmon/gl520sm.c
+++ b/drivers/hwmon/gl520sm.c
@@ -122,7 +122,7 @@ static struct i2c_driver gl520_driver = {
122/* Client data */ 122/* Client data */
123struct gl520_data { 123struct gl520_data {
124 struct i2c_client client; 124 struct i2c_client client;
125 struct class_device *class_dev; 125 struct device *hwmon_dev;
126 struct mutex update_lock; 126 struct mutex update_lock;
127 char valid; /* zero until the following fields are valid */ 127 char valid; /* zero until the following fields are valid */
128 unsigned long last_updated; /* in jiffies */ 128 unsigned long last_updated; /* in jiffies */
@@ -622,9 +622,9 @@ static int gl520_detect(struct i2c_adapter *adapter, int address, int kind)
622 } 622 }
623 623
624 624
625 data->class_dev = hwmon_device_register(&new_client->dev); 625 data->hwmon_dev = hwmon_device_register(&new_client->dev);
626 if (IS_ERR(data->class_dev)) { 626 if (IS_ERR(data->hwmon_dev)) {
627 err = PTR_ERR(data->class_dev); 627 err = PTR_ERR(data->hwmon_dev);
628 goto exit_remove_files; 628 goto exit_remove_files;
629 } 629 }
630 630
@@ -685,7 +685,7 @@ static int gl520_detach_client(struct i2c_client *client)
685 struct gl520_data *data = i2c_get_clientdata(client); 685 struct gl520_data *data = i2c_get_clientdata(client);
686 int err; 686 int err;
687 687
688 hwmon_device_unregister(data->class_dev); 688 hwmon_device_unregister(data->hwmon_dev);
689 sysfs_remove_group(&client->dev.kobj, &gl520_group); 689 sysfs_remove_group(&client->dev.kobj, &gl520_group);
690 sysfs_remove_group(&client->dev.kobj, &gl520_group_opt); 690 sysfs_remove_group(&client->dev.kobj, &gl520_group_opt);
691 691