aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/mce_amd_inj.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-12-14 18:21:07 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-14 18:21:07 -0500
commitfe5ff8b84c8b03348a2f64ea9d884348faec2217 (patch)
tree8ad7290974ee129eee717a80846d25ea202fa21b /drivers/edac/mce_amd_inj.c
parent997d3eaf02cad6fdb54bd6085c9a7c48ddd68a2d (diff)
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 <dougthompson@xmission.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Borislav Petkov <borislav.petkov@amd.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/edac/mce_amd_inj.c')
-rw-r--r--drivers/edac/mce_amd_inj.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/edac/mce_amd_inj.c b/drivers/edac/mce_amd_inj.c
index 73c3e26a0bce..885e8ad8fdcf 100644
--- a/drivers/edac/mce_amd_inj.c
+++ b/drivers/edac/mce_amd_inj.c
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13#include <linux/kobject.h> 13#include <linux/kobject.h>
14#include <linux/sysdev.h>
15#include <linux/edac.h> 14#include <linux/edac.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <asm/mce.h> 16#include <asm/mce.h>
@@ -116,14 +115,14 @@ static struct edac_mce_attr *sysfs_attrs[] = { &mce_attr_status, &mce_attr_misc,
116 115
117static int __init edac_init_mce_inject(void) 116static int __init edac_init_mce_inject(void)
118{ 117{
119 struct sysdev_class *edac_class = NULL; 118 struct bus_type *edac_subsys = NULL;
120 int i, err = 0; 119 int i, err = 0;
121 120
122 edac_class = edac_get_sysfs_class(); 121 edac_subsys = edac_get_sysfs_subsys();
123 if (!edac_class) 122 if (!edac_subsys)
124 return -EINVAL; 123 return -EINVAL;
125 124
126 mce_kobj = kobject_create_and_add("mce", &edac_class->kset.kobj); 125 mce_kobj = kobject_create_and_add("mce", &edac_subsys->dev_root->kobj);
127 if (!mce_kobj) { 126 if (!mce_kobj) {
128 printk(KERN_ERR "Error creating a mce kset.\n"); 127 printk(KERN_ERR "Error creating a mce kset.\n");
129 err = -ENOMEM; 128 err = -ENOMEM;
@@ -147,7 +146,7 @@ err_sysfs_create:
147 kobject_del(mce_kobj); 146 kobject_del(mce_kobj);
148 147
149err_mce_kobj: 148err_mce_kobj:
150 edac_put_sysfs_class(); 149 edac_put_sysfs_subsys();
151 150
152 return err; 151 return err;
153} 152}
@@ -161,7 +160,7 @@ static void __exit edac_exit_mce_inject(void)
161 160
162 kobject_del(mce_kobj); 161 kobject_del(mce_kobj);
163 162
164 edac_put_sysfs_class(); 163 edac_put_sysfs_subsys();
165} 164}
166 165
167module_init(edac_init_mce_inject); 166module_init(edac_init_mce_inject);