diff options
Diffstat (limited to 'drivers/edac/edac_device_sysfs.c')
-rw-r--r-- | drivers/edac/edac_device_sysfs.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/edac/edac_device_sysfs.c b/drivers/edac/edac_device_sysfs.c index 86649df00285..b4ea185ccebf 100644 --- a/drivers/edac/edac_device_sysfs.c +++ b/drivers/edac/edac_device_sysfs.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * file for managing the edac_device class of devices for EDAC | 2 | * file for managing the edac_device subsystem of devices for EDAC |
3 | * | 3 | * |
4 | * (C) 2007 SoftwareBitMaker | 4 | * (C) 2007 SoftwareBitMaker |
5 | * | 5 | * |
@@ -230,21 +230,21 @@ static struct kobj_type ktype_device_ctrl = { | |||
230 | */ | 230 | */ |
231 | int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev) | 231 | int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev) |
232 | { | 232 | { |
233 | struct sysdev_class *edac_class; | 233 | struct bus_type *edac_subsys; |
234 | int err; | 234 | int err; |
235 | 235 | ||
236 | debugf1("%s()\n", __func__); | 236 | debugf1("%s()\n", __func__); |
237 | 237 | ||
238 | /* get the /sys/devices/system/edac reference */ | 238 | /* get the /sys/devices/system/edac reference */ |
239 | edac_class = edac_get_sysfs_class(); | 239 | edac_subsys = edac_get_sysfs_subsys(); |
240 | if (edac_class == NULL) { | 240 | if (edac_subsys == NULL) { |
241 | debugf1("%s() no edac_class error\n", __func__); | 241 | debugf1("%s() no edac_subsys error\n", __func__); |
242 | err = -ENODEV; | 242 | err = -ENODEV; |
243 | goto err_out; | 243 | goto err_out; |
244 | } | 244 | } |
245 | 245 | ||
246 | /* Point to the 'edac_class' this instance 'reports' to */ | 246 | /* Point to the 'edac_subsys' this instance 'reports' to */ |
247 | edac_dev->edac_class = edac_class; | 247 | edac_dev->edac_subsys = edac_subsys; |
248 | 248 | ||
249 | /* Init the devices's kobject */ | 249 | /* Init the devices's kobject */ |
250 | memset(&edac_dev->kobj, 0, sizeof(struct kobject)); | 250 | memset(&edac_dev->kobj, 0, sizeof(struct kobject)); |
@@ -261,7 +261,7 @@ int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev) | |||
261 | 261 | ||
262 | /* register */ | 262 | /* register */ |
263 | err = kobject_init_and_add(&edac_dev->kobj, &ktype_device_ctrl, | 263 | err = kobject_init_and_add(&edac_dev->kobj, &ktype_device_ctrl, |
264 | &edac_class->kset.kobj, | 264 | &edac_subsys->dev_root->kobj, |
265 | "%s", edac_dev->name); | 265 | "%s", edac_dev->name); |
266 | if (err) { | 266 | if (err) { |
267 | debugf1("%s()Failed to register '.../edac/%s'\n", | 267 | debugf1("%s()Failed to register '.../edac/%s'\n", |
@@ -284,7 +284,7 @@ err_kobj_reg: | |||
284 | module_put(edac_dev->owner); | 284 | module_put(edac_dev->owner); |
285 | 285 | ||
286 | err_mod_get: | 286 | err_mod_get: |
287 | edac_put_sysfs_class(); | 287 | edac_put_sysfs_subsys(); |
288 | 288 | ||
289 | err_out: | 289 | err_out: |
290 | return err; | 290 | return err; |
@@ -308,7 +308,7 @@ void edac_device_unregister_sysfs_main_kobj(struct edac_device_ctl_info *dev) | |||
308 | * b) 'kfree' the memory | 308 | * b) 'kfree' the memory |
309 | */ | 309 | */ |
310 | kobject_put(&dev->kobj); | 310 | kobject_put(&dev->kobj); |
311 | edac_put_sysfs_class(); | 311 | edac_put_sysfs_subsys(); |
312 | } | 312 | } |
313 | 313 | ||
314 | /* edac_dev -> instance information */ | 314 | /* edac_dev -> instance information */ |