diff options
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 | ||