diff options
Diffstat (limited to 'fs/ocfs2/cluster/sys.c')
-rw-r--r-- | fs/ocfs2/cluster/sys.c | 7 |
1 files changed, 3 insertions, 4 deletions
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) \ |
43 | struct o2cb_attribute o2cb_attr_##_name = __ATTR(_name, _mode, _show, _store) | 43 | struct 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 | ||
48 | static ssize_t o2cb_interface_revision_show(char *buf) | 47 | static ssize_t o2cb_interface_revision_show(char *buf) |
@@ -79,7 +78,7 @@ static ssize_t | |||
79 | o2cb_show(struct kobject * kobj, struct attribute * attr, char * buffer) | 78 | o2cb_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; |