aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_stub.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2012-01-06 14:42:52 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-06 14:42:52 -0500
commitff4b8a57f0aaa2882d444ca44b2b9b333d22a4df (patch)
treed851c923f85566572112d4c0f884cff388a3cc05 /drivers/edac/edac_stub.c
parent805a6af8dba5dfdd35ec35dc52ec0122400b2610 (diff)
parentea04018e6bc5ddb2f0466c0e5b986bd4901b7e8e (diff)
Merge branch 'driver-core-next' into Linux 3.2
This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file, and it fixes the build error in the arch/x86/kernel/microcode_core.c file, that the merge did not catch. The microcode_core.c patch was provided by Stephen Rothwell <sfr@canb.auug.org.au> who was invaluable in the merge issues involved with the large sysdev removal process in the driver-core tree. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/edac/edac_stub.c')
-rw-r--r--drivers/edac/edac_stub.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/edac/edac_stub.c b/drivers/edac/edac_stub.c
index 86ad2eee1201..670c4481453b 100644
--- a/drivers/edac/edac_stub.c
+++ b/drivers/edac/edac_stub.c
@@ -26,7 +26,7 @@ EXPORT_SYMBOL_GPL(edac_handlers);
26int edac_err_assert = 0; 26int edac_err_assert = 0;
27EXPORT_SYMBOL_GPL(edac_err_assert); 27EXPORT_SYMBOL_GPL(edac_err_assert);
28 28
29static atomic_t edac_class_valid = ATOMIC_INIT(0); 29static atomic_t edac_subsys_valid = ATOMIC_INIT(0);
30 30
31/* 31/*
32 * called to determine if there is an EDAC driver interested in 32 * called to determine if there is an EDAC driver interested in
@@ -54,36 +54,37 @@ EXPORT_SYMBOL_GPL(edac_atomic_assert_error);
54 * sysfs object: /sys/devices/system/edac 54 * sysfs object: /sys/devices/system/edac
55 * need to export to other files 55 * need to export to other files
56 */ 56 */
57struct sysdev_class edac_class = { 57struct bus_type edac_subsys = {
58 .name = "edac", 58 .name = "edac",
59 .dev_name = "edac",
59}; 60};
60EXPORT_SYMBOL_GPL(edac_class); 61EXPORT_SYMBOL_GPL(edac_subsys);
61 62
62/* return pointer to the 'edac' node in sysfs */ 63/* return pointer to the 'edac' node in sysfs */
63struct sysdev_class *edac_get_sysfs_class(void) 64struct bus_type *edac_get_sysfs_subsys(void)
64{ 65{
65 int err = 0; 66 int err = 0;
66 67
67 if (atomic_read(&edac_class_valid)) 68 if (atomic_read(&edac_subsys_valid))
68 goto out; 69 goto out;
69 70
70 /* create the /sys/devices/system/edac directory */ 71 /* create the /sys/devices/system/edac directory */
71 err = sysdev_class_register(&edac_class); 72 err = subsys_system_register(&edac_subsys, NULL);
72 if (err) { 73 if (err) {
73 printk(KERN_ERR "Error registering toplevel EDAC sysfs dir\n"); 74 printk(KERN_ERR "Error registering toplevel EDAC sysfs dir\n");
74 return NULL; 75 return NULL;
75 } 76 }
76 77
77out: 78out:
78 atomic_inc(&edac_class_valid); 79 atomic_inc(&edac_subsys_valid);
79 return &edac_class; 80 return &edac_subsys;
80} 81}
81EXPORT_SYMBOL_GPL(edac_get_sysfs_class); 82EXPORT_SYMBOL_GPL(edac_get_sysfs_subsys);
82 83
83void edac_put_sysfs_class(void) 84void edac_put_sysfs_subsys(void)
84{ 85{
85 /* last user unregisters it */ 86 /* last user unregisters it */
86 if (atomic_dec_and_test(&edac_class_valid)) 87 if (atomic_dec_and_test(&edac_subsys_valid))
87 sysdev_class_unregister(&edac_class); 88 bus_unregister(&edac_subsys);
88} 89}
89EXPORT_SYMBOL_GPL(edac_put_sysfs_class); 90EXPORT_SYMBOL_GPL(edac_put_sysfs_subsys);