aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_module.h
diff options
context:
space:
mode:
authorDoug Thompson <dougthompson@xmission.com>2007-07-19 04:50:27 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:57 -0400
commit8096cfafbb7ad3cb1a286ae7e8086167f4ebb4b6 (patch)
tree27b859beffef019095db810244f93e10473ea06f /drivers/edac/edac_module.h
parentd45e7823baf655ced91c7987fb4ba9aae990ad6d (diff)
drivers/edac: fix edac_mc sysfs completion code
This patch refactors the 'releasing' of kobjects for the edac_mc type of device. The correct pattern of kobject release is followed. As internal kobjs are allocated they bump a ref count on the top level kobj. It in turn has a module ref count on the edac_core module. When internal kobjects are released, they dec the ref count on the top level kobj. When the top level kobj reaches zero, it decrements the ref count on the edac_core object, allow it to be unloaded, as all resources have all now been released. Cc: Alan Cox alan@lxorguk.ukuu.org.uk Signed-off-by: Doug Thompson <dougthompson@xmission.com> Acked-by: Greg KH <greg@kroah.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.h')
-rw-r--r--drivers/edac/edac_module.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/edac/edac_module.h b/drivers/edac/edac_module.h
index 37a08aa87d3e..6368cc658fc6 100644
--- a/drivers/edac/edac_module.h
+++ b/drivers/edac/edac_module.h
@@ -18,11 +18,15 @@
18 * INTERNAL EDAC MODULE: 18 * INTERNAL EDAC MODULE:
19 * EDAC memory controller sysfs create/remove functions 19 * EDAC memory controller sysfs create/remove functions
20 * and setup/teardown functions 20 * and setup/teardown functions
21 *
22 * edac_mc objects
21 */ 23 */
24extern int edac_sysfs_setup_mc_kset(void);
25extern void edac_sysfs_teardown_mc_kset(void);
26extern int edac_mc_register_sysfs_main_kobj(struct mem_ctl_info *mci);
27extern void edac_mc_unregister_sysfs_main_kobj(struct mem_ctl_info *mci);
22extern int edac_create_sysfs_mci_device(struct mem_ctl_info *mci); 28extern int edac_create_sysfs_mci_device(struct mem_ctl_info *mci);
23extern void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci); 29extern void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci);
24extern int edac_sysfs_memctrl_setup(void);
25extern void edac_sysfs_memctrl_teardown(void);
26extern void edac_check_mc_devices(void); 30extern void edac_check_mc_devices(void);
27extern int edac_get_log_ue(void); 31extern int edac_get_log_ue(void);
28extern int edac_get_log_ce(void); 32extern int edac_get_log_ce(void);