summaryrefslogtreecommitdiff
path: root/drivers/edac/edac_module.c
diff options
context:
space:
mode:
authorDave Jiang <djiang@mvista.com>2007-07-19 01:49:52 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 10:04:54 -0700
commit91b99041c1d577ded1da599ddc28cec2e07253cf (patch)
tree21b132d19166dca5c363b98e20741b78df4ad68a /drivers/edac/edac_module.c
parent81d87cb13e367bb804bf44889ae0de7369705d6c (diff)
drivers/edac: updated PCI monitoring
Moving PCI to a per-instance device model This should include the correct sysfs setup as well. Please review. Signed-off-by: Dave Jiang <djiang@mvista.com> Signed-off-by: Douglas Thompson <dougthompson@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/edac/edac_module.c')
-rw-r--r--drivers/edac/edac_module.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/drivers/edac/edac_module.c b/drivers/edac/edac_module.c
index dc900ed75178..38e4a71380aa 100644
--- a/drivers/edac/edac_module.c
+++ b/drivers/edac/edac_module.c
@@ -35,6 +35,25 @@ static struct sysdev_class edac_class = {
static int edac_class_valid = 0;
/*
+ * edac_op_state_toString()
+ */
+char * edac_op_state_toString(int opstate)
+{
+ if (opstate == OP_RUNNING_POLL)
+ return "POLLED";
+ else if (opstate == OP_RUNNING_INTERRUPT)
+ return "INTERRUPT";
+ else if (opstate == OP_RUNNING_POLL_INTR)
+ return "POLL-INTR";
+ else if (opstate == OP_ALLOC)
+ return "ALLOC";
+ else if (opstate == OP_OFFLINE)
+ return "OFFLINE";
+
+ return "UNKNOWN";
+}
+
+/*
* edac_get_edac_class()
*
* return pointer to the edac class of 'edac'
@@ -153,26 +172,16 @@ static int __init edac_init(void)
goto error_sysfs;
}
- /* Create the PCI parity sysfs entries */
- if (edac_sysfs_pci_setup()) {
- edac_printk(KERN_ERR, EDAC_MC,
- "PCI: Error initializing sysfs code\n");
- err = -ENODEV;
- goto error_mem;
- }
-
/* Setup/Initialize the edac_device system */
err = edac_workqueue_setup();
if (err) {
edac_printk(KERN_ERR, EDAC_MC, "init WorkQueue failure\n");
- goto error_pci;
+ goto error_mem;
}
return 0;
/* Error teardown stack */
-error_pci:
- edac_sysfs_pci_teardown();
error_mem:
edac_sysfs_memctrl_teardown();
error_sysfs:
@@ -192,7 +201,6 @@ static void __exit edac_exit(void)
/* tear down the various subsystems*/
edac_workqueue_teardown();
edac_sysfs_memctrl_teardown();
- edac_sysfs_pci_teardown();
edac_unregister_sysfs_edac_name();
}