aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-04-13 16:15:19 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-02 21:57:59 -0400
commit823bccfc4002296ba88c3ad0f049e1abd8108d30 (patch)
tree5338ae0b32409446af4cd00c5107d9405d5bf0b6 /fs/ocfs2
parent2609e7b9bebfd433254c02538ba803dc516ff674 (diff)
remove "struct subsystem" as it is no longer needed
We need to work on cleaning up the relationship between kobjects, ksets and ktypes. The removal of 'struct subsystem' is the first step of this, especially as it is not really needed at all. Thanks to Kay for fixing the bugs in this patch. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/cluster/masklog.c4
-rw-r--r--fs/ocfs2/cluster/masklog.h2
-rw-r--r--fs/ocfs2/cluster/sys.c7
3 files changed, 6 insertions, 7 deletions
diff --git a/fs/ocfs2/cluster/masklog.c b/fs/ocfs2/cluster/masklog.c
index 636593bf4d17..2e975c0a35e1 100644
--- a/fs/ocfs2/cluster/masklog.c
+++ b/fs/ocfs2/cluster/masklog.c
@@ -147,7 +147,7 @@ static struct kset mlog_kset = {
147 .kobj = {.name = "logmask", .ktype = &mlog_ktype}, 147 .kobj = {.name = "logmask", .ktype = &mlog_ktype},
148}; 148};
149 149
150int mlog_sys_init(struct subsystem *o2cb_subsys) 150int mlog_sys_init(struct kset *o2cb_subsys)
151{ 151{
152 int i = 0; 152 int i = 0;
153 153
@@ -157,7 +157,7 @@ int mlog_sys_init(struct subsystem *o2cb_subsys)
157 } 157 }
158 mlog_attr_ptrs[i] = NULL; 158 mlog_attr_ptrs[i] = NULL;
159 159
160 mlog_kset.subsys = o2cb_subsys; 160 kobj_set_kset_s(&mlog_kset, o2cb_subsys);
161 return kset_register(&mlog_kset); 161 return kset_register(&mlog_kset);
162} 162}
163 163
diff --git a/fs/ocfs2/cluster/masklog.h b/fs/ocfs2/cluster/masklog.h
index a42628ba9ddf..75cd877f6d42 100644
--- a/fs/ocfs2/cluster/masklog.h
+++ b/fs/ocfs2/cluster/masklog.h
@@ -278,7 +278,7 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;
278 278
279#include <linux/kobject.h> 279#include <linux/kobject.h>
280#include <linux/sysfs.h> 280#include <linux/sysfs.h>
281int mlog_sys_init(struct subsystem *o2cb_subsys); 281int mlog_sys_init(struct kset *o2cb_subsys);
282void mlog_sys_shutdown(void); 282void mlog_sys_shutdown(void);
283 283
284#endif /* O2CLUSTER_MASKLOG_H */ 284#endif /* O2CLUSTER_MASKLOG_H */
diff --git a/fs/ocfs2/cluster/sys.c b/fs/ocfs2/cluster/sys.c
index 1d9f6acafa2e..64f6f378fd09 100644
--- a/fs/ocfs2/cluster/sys.c
+++ b/fs/ocfs2/cluster/sys.c
@@ -42,7 +42,6 @@ struct o2cb_attribute {
42#define O2CB_ATTR(_name, _mode, _show, _store) \ 42#define O2CB_ATTR(_name, _mode, _show, _store) \
43struct o2cb_attribute o2cb_attr_##_name = __ATTR(_name, _mode, _show, _store) 43struct o2cb_attribute o2cb_attr_##_name = __ATTR(_name, _mode, _show, _store)
44 44
45#define to_o2cb_subsys(k) container_of(to_kset(k), struct subsystem, kset)
46#define to_o2cb_attr(_attr) container_of(_attr, struct o2cb_attribute, attr) 45#define to_o2cb_attr(_attr) container_of(_attr, struct o2cb_attribute, attr)
47 46
48static ssize_t o2cb_interface_revision_show(char *buf) 47static ssize_t o2cb_interface_revision_show(char *buf)
@@ -79,7 +78,7 @@ static ssize_t
79o2cb_show(struct kobject * kobj, struct attribute * attr, char * buffer) 78o2cb_show(struct kobject * kobj, struct attribute * attr, char * buffer)
80{ 79{
81 struct o2cb_attribute *o2cb_attr = to_o2cb_attr(attr); 80 struct o2cb_attribute *o2cb_attr = to_o2cb_attr(attr);
82 struct subsystem *sbs = to_o2cb_subsys(kobj); 81 struct kset *sbs = to_kset(kobj);
83 82
84 BUG_ON(sbs != &o2cb_subsys); 83 BUG_ON(sbs != &o2cb_subsys);
85 84
@@ -93,7 +92,7 @@ o2cb_store(struct kobject * kobj, struct attribute * attr,
93 const char * buffer, size_t count) 92 const char * buffer, size_t count)
94{ 93{
95 struct o2cb_attribute *o2cb_attr = to_o2cb_attr(attr); 94 struct o2cb_attribute *o2cb_attr = to_o2cb_attr(attr);
96 struct subsystem *sbs = to_o2cb_subsys(kobj); 95 struct kset *sbs = to_kset(kobj);
97 96
98 BUG_ON(sbs != &o2cb_subsys); 97 BUG_ON(sbs != &o2cb_subsys);
99 98
@@ -112,7 +111,7 @@ int o2cb_sys_init(void)
112{ 111{
113 int ret; 112 int ret;
114 113
115 o2cb_subsys.kset.kobj.ktype = &o2cb_subsys_type; 114 o2cb_subsys.kobj.ktype = &o2cb_subsys_type;
116 ret = subsystem_register(&o2cb_subsys); 115 ret = subsystem_register(&o2cb_subsys);
117 if (ret) 116 if (ret)
118 return ret; 117 return ret;