From fe5ff8b84c8b03348a2f64ea9d884348faec2217 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 14 Dec 2011 15:21:07 -0800 Subject: edac: convert sysdev_class to a regular subsystem After all sysdev classes are ported to regular driver core entities, the sysdev implementation will be entirely removed from the kernel. Cc: Doug Thompson Cc: Paul Gortmaker Cc: Lucas De Marchi Cc: Borislav Petkov Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman --- drivers/edac/mce_amd_inj.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'drivers/edac/mce_amd_inj.c') diff --git a/drivers/edac/mce_amd_inj.c b/drivers/edac/mce_amd_inj.c index 73c3e26..885e8ad 100644 --- a/drivers/edac/mce_amd_inj.c +++ b/drivers/edac/mce_amd_inj.c @@ -11,7 +11,6 @@ */ #include -#include #include #include #include @@ -116,14 +115,14 @@ static struct edac_mce_attr *sysfs_attrs[] = { &mce_attr_status, &mce_attr_misc, static int __init edac_init_mce_inject(void) { - struct sysdev_class *edac_class = NULL; + struct bus_type *edac_subsys = NULL; int i, err = 0; - edac_class = edac_get_sysfs_class(); - if (!edac_class) + edac_subsys = edac_get_sysfs_subsys(); + if (!edac_subsys) return -EINVAL; - mce_kobj = kobject_create_and_add("mce", &edac_class->kset.kobj); + mce_kobj = kobject_create_and_add("mce", &edac_subsys->dev_root->kobj); if (!mce_kobj) { printk(KERN_ERR "Error creating a mce kset.\n"); err = -ENOMEM; @@ -147,7 +146,7 @@ err_sysfs_create: kobject_del(mce_kobj); err_mce_kobj: - edac_put_sysfs_class(); + edac_put_sysfs_subsys(); return err; } @@ -161,7 +160,7 @@ static void __exit edac_exit_mce_inject(void) kobject_del(mce_kobj); - edac_put_sysfs_class(); + edac_put_sysfs_subsys(); } module_init(edac_init_mce_inject); -- cgit v1.1