diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /drivers/edac/mce_amd_inj.c | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'drivers/edac/mce_amd_inj.c')
-rw-r--r-- | drivers/edac/mce_amd_inj.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/edac/mce_amd_inj.c b/drivers/edac/mce_amd_inj.c index 2ae78f20cc2..a4987e03f59 100644 --- a/drivers/edac/mce_amd_inj.c +++ b/drivers/edac/mce_amd_inj.c | |||
@@ -6,14 +6,13 @@ | |||
6 | * This file may be distributed under the terms of the GNU General Public | 6 | * This file may be distributed under the terms of the GNU General Public |
7 | * License version 2. | 7 | * License version 2. |
8 | * | 8 | * |
9 | * Copyright (c) 2010: Borislav Petkov <bp@alien8.de> | 9 | * Copyright (c) 2010: Borislav Petkov <borislav.petkov@amd.com> |
10 | * Advanced Micro Devices Inc. | 10 | * Advanced Micro Devices Inc. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/kobject.h> | 13 | #include <linux/kobject.h> |
14 | #include <linux/device.h> | 14 | #include <linux/sysdev.h> |
15 | #include <linux/edac.h> | 15 | #include <linux/edac.h> |
16 | #include <linux/module.h> | ||
17 | #include <asm/mce.h> | 16 | #include <asm/mce.h> |
18 | 17 | ||
19 | #include "mce_amd.h" | 18 | #include "mce_amd.h" |
@@ -116,14 +115,14 @@ static struct edac_mce_attr *sysfs_attrs[] = { &mce_attr_status, &mce_attr_misc, | |||
116 | 115 | ||
117 | static int __init edac_init_mce_inject(void) | 116 | static int __init edac_init_mce_inject(void) |
118 | { | 117 | { |
119 | struct bus_type *edac_subsys = NULL; | 118 | struct sysdev_class *edac_class = NULL; |
120 | int i, err = 0; | 119 | int i, err = 0; |
121 | 120 | ||
122 | edac_subsys = edac_get_sysfs_subsys(); | 121 | edac_class = edac_get_sysfs_class(); |
123 | if (!edac_subsys) | 122 | if (!edac_class) |
124 | return -EINVAL; | 123 | return -EINVAL; |
125 | 124 | ||
126 | mce_kobj = kobject_create_and_add("mce", &edac_subsys->dev_root->kobj); | 125 | mce_kobj = kobject_create_and_add("mce", &edac_class->kset.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 | ||
149 | err_mce_kobj: | 148 | err_mce_kobj: |
150 | edac_put_sysfs_subsys(); | 149 | edac_put_sysfs_class(); |
151 | 150 | ||
152 | return err; | 151 | return err; |
153 | } | 152 | } |
@@ -161,13 +160,13 @@ 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_subsys(); | 163 | edac_put_sysfs_class(); |
165 | } | 164 | } |
166 | 165 | ||
167 | module_init(edac_init_mce_inject); | 166 | module_init(edac_init_mce_inject); |
168 | module_exit(edac_exit_mce_inject); | 167 | module_exit(edac_exit_mce_inject); |
169 | 168 | ||
170 | MODULE_LICENSE("GPL"); | 169 | MODULE_LICENSE("GPL"); |
171 | MODULE_AUTHOR("Borislav Petkov <bp@alien8.de>"); | 170 | MODULE_AUTHOR("Borislav Petkov <borislav.petkov@amd.com>"); |
172 | MODULE_AUTHOR("AMD Inc."); | 171 | MODULE_AUTHOR("AMD Inc."); |
173 | MODULE_DESCRIPTION("MCE injection facility for testing MCE decoding"); | 172 | MODULE_DESCRIPTION("MCE injection facility for testing MCE decoding"); |