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/w83781d.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/w83781d.c')
-rw-r--r-- | drivers/hwmon/w83781d.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c index c12bdf9d9e1d..e622ec5b092e 100644 --- a/drivers/hwmon/w83781d.c +++ b/drivers/hwmon/w83781d.c | |||
@@ -220,7 +220,7 @@ DIV_TO_REG(long val, enum chips type) | |||
220 | the driver field to differentiate between I2C and ISA chips. */ | 220 | the driver field to differentiate between I2C and ISA chips. */ |
221 | struct w83781d_data { | 221 | struct w83781d_data { |
222 | struct i2c_client client; | 222 | struct i2c_client client; |
223 | struct class_device *class_dev; | 223 | struct device *hwmon_dev; |
224 | struct mutex lock; | 224 | struct mutex lock; |
225 | enum chips type; | 225 | enum chips type; |
226 | 226 | ||
@@ -1158,9 +1158,9 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind) | |||
1158 | if (err) | 1158 | if (err) |
1159 | goto ERROR4; | 1159 | goto ERROR4; |
1160 | 1160 | ||
1161 | data->class_dev = hwmon_device_register(dev); | 1161 | data->hwmon_dev = hwmon_device_register(dev); |
1162 | if (IS_ERR(data->class_dev)) { | 1162 | if (IS_ERR(data->hwmon_dev)) { |
1163 | err = PTR_ERR(data->class_dev); | 1163 | err = PTR_ERR(data->hwmon_dev); |
1164 | goto ERROR4; | 1164 | goto ERROR4; |
1165 | } | 1165 | } |
1166 | 1166 | ||
@@ -1194,7 +1194,7 @@ w83781d_detach_client(struct i2c_client *client) | |||
1194 | 1194 | ||
1195 | /* main client */ | 1195 | /* main client */ |
1196 | if (data) { | 1196 | if (data) { |
1197 | hwmon_device_unregister(data->class_dev); | 1197 | hwmon_device_unregister(data->hwmon_dev); |
1198 | sysfs_remove_group(&client->dev.kobj, &w83781d_group); | 1198 | sysfs_remove_group(&client->dev.kobj, &w83781d_group); |
1199 | sysfs_remove_group(&client->dev.kobj, &w83781d_group_opt); | 1199 | sysfs_remove_group(&client->dev.kobj, &w83781d_group_opt); |
1200 | } | 1200 | } |
@@ -1261,9 +1261,9 @@ w83781d_isa_probe(struct platform_device *pdev) | |||
1261 | if (err) | 1261 | if (err) |
1262 | goto exit_remove_files; | 1262 | goto exit_remove_files; |
1263 | 1263 | ||
1264 | data->class_dev = hwmon_device_register(&pdev->dev); | 1264 | data->hwmon_dev = hwmon_device_register(&pdev->dev); |
1265 | if (IS_ERR(data->class_dev)) { | 1265 | if (IS_ERR(data->hwmon_dev)) { |
1266 | err = PTR_ERR(data->class_dev); | 1266 | err = PTR_ERR(data->hwmon_dev); |
1267 | goto exit_remove_files; | 1267 | goto exit_remove_files; |
1268 | } | 1268 | } |
1269 | 1269 | ||
@@ -1285,7 +1285,7 @@ w83781d_isa_remove(struct platform_device *pdev) | |||
1285 | { | 1285 | { |
1286 | struct w83781d_data *data = platform_get_drvdata(pdev); | 1286 | struct w83781d_data *data = platform_get_drvdata(pdev); |
1287 | 1287 | ||
1288 | hwmon_device_unregister(data->class_dev); | 1288 | hwmon_device_unregister(data->hwmon_dev); |
1289 | sysfs_remove_group(&pdev->dev.kobj, &w83781d_group); | 1289 | sysfs_remove_group(&pdev->dev.kobj, &w83781d_group); |
1290 | sysfs_remove_group(&pdev->dev.kobj, &w83781d_group_opt); | 1290 | sysfs_remove_group(&pdev->dev.kobj, &w83781d_group_opt); |
1291 | device_remove_file(&pdev->dev, &dev_attr_name); | 1291 | device_remove_file(&pdev->dev, &dev_attr_name); |