diff options
author | Tony Jones <tonyj@suse.de> | 2007-08-20 16:46:20 -0400 |
---|---|---|
committer | Mark M. Hoffman <mhoffman@lightlink.com> | 2007-10-09 22:56:30 -0400 |
commit | 1beeffe43311f64df8dd0ab08ff6b1858c58363f (patch) | |
tree | 039324186049a69f3c791165e90404aef497f3cc /drivers/hwmon/adm1021.c | |
parent | 59a35bafb223bbb0553ba1a3bb9280bda668a8d8 (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/adm1021.c')
-rw-r--r-- | drivers/hwmon/adm1021.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/adm1021.c b/drivers/hwmon/adm1021.c index 6649e0688361..5667630ac05a 100644 --- a/drivers/hwmon/adm1021.c +++ b/drivers/hwmon/adm1021.c | |||
@@ -91,7 +91,7 @@ clearing it. Weird, ey? --Phil */ | |||
91 | /* Each client has this additional data */ | 91 | /* Each client has this additional data */ |
92 | struct adm1021_data { | 92 | struct adm1021_data { |
93 | struct i2c_client client; | 93 | struct i2c_client client; |
94 | struct class_device *class_dev; | 94 | struct device *hwmon_dev; |
95 | enum chips type; | 95 | enum chips type; |
96 | 96 | ||
97 | struct mutex update_lock; | 97 | struct mutex update_lock; |
@@ -319,9 +319,9 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address, int kind) | |||
319 | if ((err = sysfs_create_group(&client->dev.kobj, &adm1021_group))) | 319 | if ((err = sysfs_create_group(&client->dev.kobj, &adm1021_group))) |
320 | goto error2; | 320 | goto error2; |
321 | 321 | ||
322 | data->class_dev = hwmon_device_register(&client->dev); | 322 | data->hwmon_dev = hwmon_device_register(&client->dev); |
323 | if (IS_ERR(data->class_dev)) { | 323 | if (IS_ERR(data->hwmon_dev)) { |
324 | err = PTR_ERR(data->class_dev); | 324 | err = PTR_ERR(data->hwmon_dev); |
325 | goto error3; | 325 | goto error3; |
326 | } | 326 | } |
327 | 327 | ||
@@ -351,7 +351,7 @@ static int adm1021_detach_client(struct i2c_client *client) | |||
351 | struct adm1021_data *data = i2c_get_clientdata(client); | 351 | struct adm1021_data *data = i2c_get_clientdata(client); |
352 | int err; | 352 | int err; |
353 | 353 | ||
354 | hwmon_device_unregister(data->class_dev); | 354 | hwmon_device_unregister(data->hwmon_dev); |
355 | sysfs_remove_group(&client->dev.kobj, &adm1021_group); | 355 | sysfs_remove_group(&client->dev.kobj, &adm1021_group); |
356 | 356 | ||
357 | if ((err = i2c_detach_client(client))) | 357 | if ((err = i2c_detach_client(client))) |