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/abituguru3.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/abituguru3.c')
-rw-r--r-- | drivers/hwmon/abituguru3.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/abituguru3.c b/drivers/hwmon/abituguru3.c index cdd8b6dea16d..cb2331bfd9d5 100644 --- a/drivers/hwmon/abituguru3.c +++ b/drivers/hwmon/abituguru3.c | |||
@@ -124,7 +124,7 @@ struct abituguru3_motherboard_info { | |||
124 | The structure is dynamically allocated, at the same time when a new | 124 | The structure is dynamically allocated, at the same time when a new |
125 | abituguru3 device is allocated. */ | 125 | abituguru3 device is allocated. */ |
126 | struct abituguru3_data { | 126 | struct abituguru3_data { |
127 | struct class_device *class_dev; /* hwmon registered device */ | 127 | struct device *hwmon_dev; /* hwmon registered device */ |
128 | struct mutex update_lock; /* protect access to data and uGuru */ | 128 | struct mutex update_lock; /* protect access to data and uGuru */ |
129 | unsigned short addr; /* uguru base address */ | 129 | unsigned short addr; /* uguru base address */ |
130 | char valid; /* !=0 if following fields are valid */ | 130 | char valid; /* !=0 if following fields are valid */ |
@@ -933,9 +933,9 @@ static int __devinit abituguru3_probe(struct platform_device *pdev) | |||
933 | &abituguru3_sysfs_attr[i].dev_attr)) | 933 | &abituguru3_sysfs_attr[i].dev_attr)) |
934 | goto abituguru3_probe_error; | 934 | goto abituguru3_probe_error; |
935 | 935 | ||
936 | data->class_dev = hwmon_device_register(&pdev->dev); | 936 | data->hwmon_dev = hwmon_device_register(&pdev->dev); |
937 | if (IS_ERR(data->class_dev)) { | 937 | if (IS_ERR(data->hwmon_dev)) { |
938 | res = PTR_ERR(data->class_dev); | 938 | res = PTR_ERR(data->hwmon_dev); |
939 | goto abituguru3_probe_error; | 939 | goto abituguru3_probe_error; |
940 | } | 940 | } |
941 | 941 | ||
@@ -957,7 +957,7 @@ static int __devexit abituguru3_remove(struct platform_device *pdev) | |||
957 | struct abituguru3_data *data = platform_get_drvdata(pdev); | 957 | struct abituguru3_data *data = platform_get_drvdata(pdev); |
958 | 958 | ||
959 | platform_set_drvdata(pdev, NULL); | 959 | platform_set_drvdata(pdev, NULL); |
960 | hwmon_device_unregister(data->class_dev); | 960 | hwmon_device_unregister(data->hwmon_dev); |
961 | for (i = 0; data->sysfs_attr[i].dev_attr.attr.name; i++) | 961 | for (i = 0; data->sysfs_attr[i].dev_attr.attr.name; i++) |
962 | device_remove_file(&pdev->dev, &data->sysfs_attr[i].dev_attr); | 962 | device_remove_file(&pdev->dev, &data->sysfs_attr[i].dev_attr); |
963 | for (i = 0; i < ARRAY_SIZE(abituguru3_sysfs_attr); i++) | 963 | for (i = 0; i < ARRAY_SIZE(abituguru3_sysfs_attr); i++) |