aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_core.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_core.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_core.h')
-rw-r--r--drivers/edac/edac_core.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/edac/edac_core.h b/drivers/edac/edac_core.h
index 2c399c52193e..bd7f00cf2443 100644
--- a/drivers/edac/edac_core.h
+++ b/drivers/edac/edac_core.h
@@ -317,9 +317,8 @@ struct csrow_info {
317 struct mem_ctl_info *mci; /* the parent */ 317 struct mem_ctl_info *mci; /* the parent */
318 318
319 struct kobject kobj; /* sysfs kobject for this csrow */ 319 struct kobject kobj; /* sysfs kobject for this csrow */
320 struct completion kobj_complete;
321 320
322 /* FIXME the number of CHANNELs might need to become dynamic */ 321 /* channel information for this csrow */
323 u32 nr_channels; 322 u32 nr_channels;
324 struct channel_info *channels; 323 struct channel_info *channels;
325}; 324};
@@ -403,7 +402,6 @@ struct mem_ctl_info {
403 402
404 /* edac sysfs device control */ 403 /* edac sysfs device control */
405 struct kobject edac_mci_kobj; 404 struct kobject edac_mci_kobj;
406 struct completion kobj_complete;
407 405
408 /* Additional top controller level attributes, but specified 406 /* Additional top controller level attributes, but specified
409 * by the low level driver. 407 * by the low level driver.