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/edac_pci_sysfs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'drivers/edac/edac_pci_sysfs.c') diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c index 495198ad059c..97f5064e3992 100644 --- a/drivers/edac/edac_pci_sysfs.c +++ b/drivers/edac/edac_pci_sysfs.c @@ -338,12 +338,12 @@ static struct kobj_type ktype_edac_pci_main_kobj = { * edac_pci_main_kobj_setup() * * setup the sysfs for EDAC PCI attributes - * assumes edac_class has already been initialized + * assumes edac_subsys has already been initialized */ static int edac_pci_main_kobj_setup(void) { int err; - struct sysdev_class *edac_class; + struct bus_type *edac_subsys; debugf0("%s()\n", __func__); @@ -354,9 +354,9 @@ static int edac_pci_main_kobj_setup(void) /* First time, so create the main kobject and its * controls and attributes */ - edac_class = edac_get_sysfs_class(); - if (edac_class == NULL) { - debugf1("%s() no edac_class\n", __func__); + edac_subsys = edac_get_sysfs_subsys(); + if (edac_subsys == NULL) { + debugf1("%s() no edac_subsys\n", __func__); err = -ENODEV; goto decrement_count_fail; } @@ -381,7 +381,7 @@ static int edac_pci_main_kobj_setup(void) /* Instanstiate the pci object */ err = kobject_init_and_add(edac_pci_top_main_kobj, &ktype_edac_pci_main_kobj, - &edac_class->kset.kobj, "pci"); + &edac_subsys->dev_root->kobj, "pci"); if (err) { debugf1("Failed to register '.../edac/pci'\n"); goto kobject_init_and_add_fail; @@ -404,7 +404,7 @@ kzalloc_fail: module_put(THIS_MODULE); mod_get_fail: - edac_put_sysfs_class(); + edac_put_sysfs_subsys(); decrement_count_fail: /* if are on this error exit, nothing to tear down */ @@ -432,7 +432,7 @@ static void edac_pci_main_kobj_teardown(void) __func__); kobject_put(edac_pci_top_main_kobj); } - edac_put_sysfs_class(); + edac_put_sysfs_subsys(); } /* -- cgit v1.2.3