diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-13 16:15:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-05-02 21:57:59 -0400 |
commit | 823bccfc4002296ba88c3ad0f049e1abd8108d30 (patch) | |
tree | 5338ae0b32409446af4cd00c5107d9405d5bf0b6 /fs/sysfs | |
parent | 2609e7b9bebfd433254c02538ba803dc516ff674 (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/sysfs')
-rw-r--r-- | fs/sysfs/file.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index db0413a411d6..0e637adc2b87 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c | |||
@@ -13,8 +13,7 @@ | |||
13 | 13 | ||
14 | #include "sysfs.h" | 14 | #include "sysfs.h" |
15 | 15 | ||
16 | #define to_subsys(k) container_of(k,struct subsystem,kset.kobj) | 16 | #define to_sattr(a) container_of(a,struct subsys_attribute, attr) |
17 | #define to_sattr(a) container_of(a,struct subsys_attribute,attr) | ||
18 | 17 | ||
19 | /* | 18 | /* |
20 | * Subsystem file operations. | 19 | * Subsystem file operations. |
@@ -24,12 +23,12 @@ | |||
24 | static ssize_t | 23 | static ssize_t |
25 | subsys_attr_show(struct kobject * kobj, struct attribute * attr, char * page) | 24 | subsys_attr_show(struct kobject * kobj, struct attribute * attr, char * page) |
26 | { | 25 | { |
27 | struct subsystem * s = to_subsys(kobj); | 26 | struct kset *kset = to_kset(kobj); |
28 | struct subsys_attribute * sattr = to_sattr(attr); | 27 | struct subsys_attribute * sattr = to_sattr(attr); |
29 | ssize_t ret = -EIO; | 28 | ssize_t ret = -EIO; |
30 | 29 | ||
31 | if (sattr->show) | 30 | if (sattr->show) |
32 | ret = sattr->show(s,page); | 31 | ret = sattr->show(kset, page); |
33 | return ret; | 32 | return ret; |
34 | } | 33 | } |
35 | 34 | ||
@@ -37,12 +36,12 @@ static ssize_t | |||
37 | subsys_attr_store(struct kobject * kobj, struct attribute * attr, | 36 | subsys_attr_store(struct kobject * kobj, struct attribute * attr, |
38 | const char * page, size_t count) | 37 | const char * page, size_t count) |
39 | { | 38 | { |
40 | struct subsystem * s = to_subsys(kobj); | 39 | struct kset *kset = to_kset(kobj); |
41 | struct subsys_attribute * sattr = to_sattr(attr); | 40 | struct subsys_attribute * sattr = to_sattr(attr); |
42 | ssize_t ret = -EIO; | 41 | ssize_t ret = -EIO; |
43 | 42 | ||
44 | if (sattr->store) | 43 | if (sattr->store) |
45 | ret = sattr->store(s,page,count); | 44 | ret = sattr->store(kset, page, count); |
46 | return ret; | 45 | return ret; |
47 | } | 46 | } |
48 | 47 | ||