aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/cluster
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-09-12 18:06:57 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:51:02 -0400
commit34980ca8faebfcce31094eba6ffbb0113950361f (patch)
tree1339b5a059fdc34e688d5571749577e8f3f96f09 /fs/ocfs2/cluster
parent7e7654a92a5a75a350cc3458389bc76273498f6a (diff)
Drivers: clean up direct setting of the name of a kset
A kset should not have its name set directly, so dynamically set the name at runtime. This is needed to remove the static array in the kobject structure which will be changed in a future patch. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/ocfs2/cluster')
-rw-r--r--fs/ocfs2/cluster/masklog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ocfs2/cluster/masklog.c b/fs/ocfs2/cluster/masklog.c
index e9e042b93dbf..a4882c8df945 100644
--- a/fs/ocfs2/cluster/masklog.c
+++ b/fs/ocfs2/cluster/masklog.c
@@ -143,7 +143,7 @@ static struct kobj_type mlog_ktype = {
143}; 143};
144 144
145static struct kset mlog_kset = { 145static struct kset mlog_kset = {
146 .kobj = {.name = "logmask", .ktype = &mlog_ktype}, 146 .kobj = {.ktype = &mlog_ktype},
147}; 147};
148 148
149int mlog_sys_init(struct kset *o2cb_subsys) 149int mlog_sys_init(struct kset *o2cb_subsys)
@@ -156,6 +156,7 @@ int mlog_sys_init(struct kset *o2cb_subsys)
156 } 156 }
157 mlog_attr_ptrs[i] = NULL; 157 mlog_attr_ptrs[i] = NULL;
158 158
159 kobject_set_name(&mlog_kset.kobj, "logmask");
159 kobj_set_kset_s(&mlog_kset, *o2cb_subsys); 160 kobj_set_kset_s(&mlog_kset, *o2cb_subsys);
160 return kset_register(&mlog_kset); 161 return kset_register(&mlog_kset);
161} 162}