From 1beeffe43311f64df8dd0ab08ff6b1858c58363f Mon Sep 17 00:00:00 2001 From: Tony Jones Date: Mon, 20 Aug 2007 13:46:20 -0700 Subject: hwmon: Convert from class_device to device Convert from class_device to device for hwmon_device_register/unregister Signed-off-by: Tony Jones Signed-off-by: Greg Kroah-Hartman Signed-off-by: Kay Sievers Signed-off-by: Mark M. Hoffman --- drivers/hwmon/w83781d.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'drivers/hwmon/w83781d.c') diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c index c12bdf9d9e1..e622ec5b092 100644 --- a/drivers/hwmon/w83781d.c +++ b/drivers/hwmon/w83781d.c @@ -220,7 +220,7 @@ DIV_TO_REG(long val, enum chips type) the driver field to differentiate between I2C and ISA chips. */ struct w83781d_data { struct i2c_client client; - struct class_device *class_dev; + struct device *hwmon_dev; struct mutex lock; enum chips type; @@ -1158,9 +1158,9 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind) if (err) goto ERROR4; - data->class_dev = hwmon_device_register(dev); - if (IS_ERR(data->class_dev)) { - err = PTR_ERR(data->class_dev); + data->hwmon_dev = hwmon_device_register(dev); + if (IS_ERR(data->hwmon_dev)) { + err = PTR_ERR(data->hwmon_dev); goto ERROR4; } @@ -1194,7 +1194,7 @@ w83781d_detach_client(struct i2c_client *client) /* main client */ if (data) { - hwmon_device_unregister(data->class_dev); + hwmon_device_unregister(data->hwmon_dev); sysfs_remove_group(&client->dev.kobj, &w83781d_group); sysfs_remove_group(&client->dev.kobj, &w83781d_group_opt); } @@ -1261,9 +1261,9 @@ w83781d_isa_probe(struct platform_device *pdev) if (err) goto exit_remove_files; - data->class_dev = hwmon_device_register(&pdev->dev); - if (IS_ERR(data->class_dev)) { - err = PTR_ERR(data->class_dev); + data->hwmon_dev = hwmon_device_register(&pdev->dev); + if (IS_ERR(data->hwmon_dev)) { + err = PTR_ERR(data->hwmon_dev); goto exit_remove_files; } @@ -1285,7 +1285,7 @@ w83781d_isa_remove(struct platform_device *pdev) { struct w83781d_data *data = platform_get_drvdata(pdev); - hwmon_device_unregister(data->class_dev); + hwmon_device_unregister(data->hwmon_dev); sysfs_remove_group(&pdev->dev.kobj, &w83781d_group); sysfs_remove_group(&pdev->dev.kobj, &w83781d_group_opt); device_remove_file(&pdev->dev, &dev_attr_name); -- cgit v1.2.3-70-g09d2