aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/gl520sm.c
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2007-08-20 16:46:20 -0400
committerMark M. Hoffman <mhoffman@lightlink.com>2007-10-09 22:56:30 -0400
commit1beeffe43311f64df8dd0ab08ff6b1858c58363f (patch)
tree039324186049a69f3c791165e90404aef497f3cc /drivers/hwmon/gl520sm.c
parent59a35bafb223bbb0553ba1a3bb9280bda668a8d8 (diff)
hwmon: Convert from class_device to device
Convert from class_device to device for hwmon_device_register/unregister Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
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 ebe7b9aaa91..a3b56c816e1 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