aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/adm9240.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/adm9240.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/adm9240.c')
-rw-r--r--drivers/hwmon/adm9240.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/adm9240.c b/drivers/hwmon/adm9240.c
index aad594adf0c7..c17d0b6b3283 100644
--- a/drivers/hwmon/adm9240.c
+++ b/drivers/hwmon/adm9240.c
@@ -150,7 +150,7 @@ static struct i2c_driver adm9240_driver = {
150struct adm9240_data { 150struct adm9240_data {
151 enum chips type; 151 enum chips type;
152 struct i2c_client client; 152 struct i2c_client client;
153 struct class_device *class_dev; 153 struct device *hwmon_dev;
154 struct mutex update_lock; 154 struct mutex update_lock;
155 char valid; 155 char valid;
156 unsigned long last_updated_measure; 156 unsigned long last_updated_measure;
@@ -590,9 +590,9 @@ static int adm9240_detect(struct i2c_adapter *adapter, int address, int kind)
590 if ((err = sysfs_create_group(&new_client->dev.kobj, &adm9240_group))) 590 if ((err = sysfs_create_group(&new_client->dev.kobj, &adm9240_group)))
591 goto exit_detach; 591 goto exit_detach;
592 592
593 data->class_dev = hwmon_device_register(&new_client->dev); 593 data->hwmon_dev = hwmon_device_register(&new_client->dev);
594 if (IS_ERR(data->class_dev)) { 594 if (IS_ERR(data->hwmon_dev)) {
595 err = PTR_ERR(data->class_dev); 595 err = PTR_ERR(data->hwmon_dev);
596 goto exit_remove; 596 goto exit_remove;
597 } 597 }
598 598
@@ -620,7 +620,7 @@ static int adm9240_detach_client(struct i2c_client *client)
620 struct adm9240_data *data = i2c_get_clientdata(client); 620 struct adm9240_data *data = i2c_get_clientdata(client);
621 int err; 621 int err;
622 622
623 hwmon_device_unregister(data->class_dev); 623 hwmon_device_unregister(data->hwmon_dev);
624 sysfs_remove_group(&client->dev.kobj, &adm9240_group); 624 sysfs_remove_group(&client->dev.kobj, &adm9240_group);
625 625
626 if ((err = i2c_detach_client(client))) 626 if ((err = i2c_detach_client(client)))