aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm83.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/lm83.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/lm83.c')
-rw-r--r--drivers/hwmon/lm83.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/lm83.c b/drivers/hwmon/lm83.c
index 654c0f73464d..0336b4572a61 100644
--- a/drivers/hwmon/lm83.c
+++ b/drivers/hwmon/lm83.c
@@ -144,7 +144,7 @@ static struct i2c_driver lm83_driver = {
144 144
145struct lm83_data { 145struct lm83_data {
146 struct i2c_client client; 146 struct i2c_client client;
147 struct class_device *class_dev; 147 struct device *hwmon_dev;
148 struct mutex update_lock; 148 struct mutex update_lock;
149 char valid; /* zero until following fields are valid */ 149 char valid; /* zero until following fields are valid */
150 unsigned long last_updated; /* in jiffies */ 150 unsigned long last_updated; /* in jiffies */
@@ -400,9 +400,9 @@ static int lm83_detect(struct i2c_adapter *adapter, int address, int kind)
400 goto exit_remove_files; 400 goto exit_remove_files;
401 } 401 }
402 402
403 data->class_dev = hwmon_device_register(&new_client->dev); 403 data->hwmon_dev = hwmon_device_register(&new_client->dev);
404 if (IS_ERR(data->class_dev)) { 404 if (IS_ERR(data->hwmon_dev)) {
405 err = PTR_ERR(data->class_dev); 405 err = PTR_ERR(data->hwmon_dev);
406 goto exit_remove_files; 406 goto exit_remove_files;
407 } 407 }
408 408
@@ -424,7 +424,7 @@ static int lm83_detach_client(struct i2c_client *client)
424 struct lm83_data *data = i2c_get_clientdata(client); 424 struct lm83_data *data = i2c_get_clientdata(client);
425 int err; 425 int err;
426 426
427 hwmon_device_unregister(data->class_dev); 427 hwmon_device_unregister(data->hwmon_dev);
428 sysfs_remove_group(&client->dev.kobj, &lm83_group); 428 sysfs_remove_group(&client->dev.kobj, &lm83_group);
429 sysfs_remove_group(&client->dev.kobj, &lm83_group_opt); 429 sysfs_remove_group(&client->dev.kobj, &lm83_group_opt);
430 430