aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/adm1029.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/adm1029.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/adm1029.c')
-rw-r--r--drivers/hwmon/adm1029.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c
index 73ce31b31511..0bc897dffa27 100644
--- a/drivers/hwmon/adm1029.c
+++ b/drivers/hwmon/adm1029.c
@@ -141,7 +141,7 @@ static struct i2c_driver adm1029_driver = {
141 141
142struct adm1029_data { 142struct adm1029_data {
143 struct i2c_client client; 143 struct i2c_client client;
144 struct class_device *class_dev; 144 struct device *hwmon_dev;
145 struct mutex update_lock; 145 struct mutex update_lock;
146 char valid; /* zero until following fields are valid */ 146 char valid; /* zero until following fields are valid */
147 unsigned long last_updated; /* in jiffies */ 147 unsigned long last_updated; /* in jiffies */
@@ -391,9 +391,9 @@ static int adm1029_detect(struct i2c_adapter *adapter, int address, int kind)
391 if ((err = sysfs_create_group(&client->dev.kobj, &adm1029_group))) 391 if ((err = sysfs_create_group(&client->dev.kobj, &adm1029_group)))
392 goto exit_detach; 392 goto exit_detach;
393 393
394 data->class_dev = hwmon_device_register(&client->dev); 394 data->hwmon_dev = hwmon_device_register(&client->dev);
395 if (IS_ERR(data->class_dev)) { 395 if (IS_ERR(data->hwmon_dev)) {
396 err = PTR_ERR(data->class_dev); 396 err = PTR_ERR(data->hwmon_dev);
397 goto exit_remove_files; 397 goto exit_remove_files;
398 } 398 }
399 399
@@ -431,7 +431,7 @@ static int adm1029_detach_client(struct i2c_client *client)
431 struct adm1029_data *data = i2c_get_clientdata(client); 431 struct adm1029_data *data = i2c_get_clientdata(client);
432 int err; 432 int err;
433 433
434 hwmon_device_unregister(data->class_dev); 434 hwmon_device_unregister(data->hwmon_dev);
435 sysfs_remove_group(&client->dev.kobj, &adm1029_group); 435 sysfs_remove_group(&client->dev.kobj, &adm1029_group);
436 436
437 if ((err = i2c_detach_client(client))) 437 if ((err = i2c_detach_client(client)))