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/w83791d.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/w83791d.c')
-rw-r--r-- | drivers/hwmon/w83791d.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/w83791d.c b/drivers/hwmon/w83791d.c index 9e5f885368b4..a3cb89455ea7 100644 --- a/drivers/hwmon/w83791d.c +++ b/drivers/hwmon/w83791d.c | |||
@@ -247,7 +247,7 @@ static u8 div_to_reg(int nr, long val) | |||
247 | 247 | ||
248 | struct w83791d_data { | 248 | struct w83791d_data { |
249 | struct i2c_client client; | 249 | struct i2c_client client; |
250 | struct class_device *class_dev; | 250 | struct device *hwmon_dev; |
251 | struct mutex update_lock; | 251 | struct mutex update_lock; |
252 | 252 | ||
253 | char valid; /* !=0 if following fields are valid */ | 253 | char valid; /* !=0 if following fields are valid */ |
@@ -1017,9 +1017,9 @@ static int w83791d_detect(struct i2c_adapter *adapter, int address, int kind) | |||
1017 | goto error3; | 1017 | goto error3; |
1018 | 1018 | ||
1019 | /* Everything is ready, now register the working device */ | 1019 | /* Everything is ready, now register the working device */ |
1020 | data->class_dev = hwmon_device_register(dev); | 1020 | data->hwmon_dev = hwmon_device_register(dev); |
1021 | if (IS_ERR(data->class_dev)) { | 1021 | if (IS_ERR(data->hwmon_dev)) { |
1022 | err = PTR_ERR(data->class_dev); | 1022 | err = PTR_ERR(data->hwmon_dev); |
1023 | goto error4; | 1023 | goto error4; |
1024 | } | 1024 | } |
1025 | 1025 | ||
@@ -1051,7 +1051,7 @@ static int w83791d_detach_client(struct i2c_client *client) | |||
1051 | 1051 | ||
1052 | /* main client */ | 1052 | /* main client */ |
1053 | if (data) { | 1053 | if (data) { |
1054 | hwmon_device_unregister(data->class_dev); | 1054 | hwmon_device_unregister(data->hwmon_dev); |
1055 | sysfs_remove_group(&client->dev.kobj, &w83791d_group); | 1055 | sysfs_remove_group(&client->dev.kobj, &w83791d_group); |
1056 | } | 1056 | } |
1057 | 1057 | ||