aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_core.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-09-25 13:42:25 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-10 11:49:30 -0300
commitb968759ee7102f86fec5f3349f7a8ab4556884a3 (patch)
treedcea622a061de20fee0e64b8224e323a1fa5b4b1 /drivers/edac/edac_core.h
parentDocumentation/edac.txt: Reflect the sysfs changes at the document (diff)
downloadlinux-dev-b968759ee7102f86fec5f3349f7a8ab4556884a3.tar.xz
linux-dev-b968759ee7102f86fec5f3349f7a8ab4556884a3.zip
edac: Create an unique instance for each kobj
Current code only works when there's just one memory controller, since we need one kobj for each instance. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/edac_core.h')
-rw-r--r--drivers/edac/edac_core.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/edac/edac_core.h b/drivers/edac/edac_core.h
index 02bbbc9696d9..efca9343d26a 100644
--- a/drivers/edac/edac_core.h
+++ b/drivers/edac/edac_core.h
@@ -342,23 +342,29 @@ struct csrow_info {
};
struct mcidev_sysfs_group {
- const char *name;
- struct mcidev_sysfs_attribute *mcidev_attr;
- struct kobject kobj;
+ const char *name; /* group name */
+ struct mcidev_sysfs_attribute *mcidev_attr; /* group attributes */
+};
+
+struct mcidev_sysfs_group_kobj {
+ struct list_head list; /* list for all instances within a mc */
+
+ struct kobject kobj; /* kobj for the group */
+ struct mcidev_sysfs_group *grp; /* group description table */
struct mem_ctl_info *mci; /* the parent */
};
-
/* mcidev_sysfs_attribute structure
* used for driver sysfs attributes and in mem_ctl_info
* sysfs top level entries
*/
struct mcidev_sysfs_attribute {
+ /* It should use either attr or grp */
struct attribute attr;
+ struct mcidev_sysfs_group *grp; /* Points to a group of attributes */
- struct mcidev_sysfs_group *grp;
-
+ /* Ops for show/store values at the attribute - not used on group */
ssize_t (*show)(struct mem_ctl_info *,char *);
ssize_t (*store)(struct mem_ctl_info *, const char *,size_t);
};
@@ -436,6 +442,9 @@ struct mem_ctl_info {
/* edac sysfs device control */
struct kobject edac_mci_kobj;
+ /* list for all grp instances within a mc */
+ struct list_head grp_kobj_list;
+
/* Additional top controller level attributes, but specified
* by the low level driver.
*