X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fedac%2Fedac_module.c;h=7e1374afd967256054be17b687954151576d60ae;hb=64c2eae225137a8f5a88b6a416fc182d36e8ae9f;hp=9e7406f28b3bfd5fbfe49710b7aede85c63afe70;hpb=f044091ca4c0b05be8f83748d76d4fbba4fc74cf;p=linux-2.6-omap-h63xx.git diff --git a/drivers/edac/edac_module.c b/drivers/edac/edac_module.c index 9e7406f28b3..7e1374afd96 100644 --- a/drivers/edac/edac_module.c +++ b/drivers/edac/edac_module.c @@ -1,12 +1,13 @@ /* * edac_module.c * - * (C) 2007 www.douglaskthompson.com + * (C) 2007 www.softwarebitmaker.com + * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. * - * Author: Doug Thompson + * Author: Doug Thompson * */ #include @@ -14,11 +15,11 @@ #include "edac_core.h" #include "edac_module.h" -#define EDAC_MC_VERSION "Ver: 2.0.4 " __DATE__ +#define EDAC_VERSION "Ver: 2.1.0 " __DATE__ #ifdef CONFIG_EDAC_DEBUG /* Values of 0 to 4 will generate output */ -int edac_debug_level = 1; +int edac_debug_level = 2; EXPORT_SYMBOL_GPL(edac_debug_level); #endif @@ -30,14 +31,14 @@ struct workqueue_struct *edac_workqueue; * need to export to other files in this modules */ static struct sysdev_class edac_class = { - set_kset_name("edac"), + .name = "edac", }; static int edac_class_valid; /* - * edac_op_state_toString() + * edac_op_state_to_string() */ -char *edac_op_state_toString(int opstate) +char *edac_op_state_to_string(int opstate) { if (opstate == OP_RUNNING_POLL) return "POLLED"; @@ -141,7 +142,7 @@ static int __init edac_init(void) { int err = 0; - edac_printk(KERN_INFO, EDAC_MC, EDAC_MC_VERSION "\n"); + edac_printk(KERN_INFO, EDAC_MC, EDAC_VERSION "\n"); /* * Harvest and clear any boot/initialization PCI parity errors @@ -153,7 +154,7 @@ static int __init edac_init(void) edac_pci_clear_parity_errors(); /* - * perform the registration of the /sys/devices/system/edac object + * perform the registration of the /sys/devices/system/edac class object */ if (edac_register_sysfs_edac_name()) { edac_printk(KERN_ERR, EDAC_MC, @@ -162,29 +163,29 @@ static int __init edac_init(void) goto error; } - /* Create the MC sysfs entries, must be first + /* + * now set up the mc_kset under the edac class object */ - if (edac_sysfs_memctrl_setup()) { - edac_printk(KERN_ERR, EDAC_MC, - "Error initializing sysfs code\n"); - err = -ENODEV; - goto error_sysfs; - } + err = edac_sysfs_setup_mc_kset(); + if (err) + goto sysfs_setup_fail; - /* Setup/Initialize the edac_device system */ + /* Setup/Initialize the workq for this core */ err = edac_workqueue_setup(); if (err) { edac_printk(KERN_ERR, EDAC_MC, "init WorkQueue failure\n"); - goto error_mem; + goto workq_fail; } return 0; /* Error teardown stack */ -error_mem: - edac_sysfs_memctrl_teardown(); -error_sysfs: +workq_fail: + edac_sysfs_teardown_mc_kset(); + +sysfs_setup_fail: edac_unregister_sysfs_edac_name(); + error: return err; } @@ -199,7 +200,7 @@ static void __exit edac_exit(void) /* tear down the various subsystems */ edac_workqueue_teardown(); - edac_sysfs_memctrl_teardown(); + edac_sysfs_teardown_mc_kset(); edac_unregister_sysfs_edac_name(); }