aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-04 21:04:48 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-04 21:04:48 -0400
commit5b339915762d30b21995aa7263e74081f2f1110a (patch)
tree4e076dbd27025054b21dddd78a1cb3fef3de34d7 /fs/sysfs
parent89661adaaee2f85116b399e642129ccd4dafd195 (diff)
parent823bccfc4002296ba88c3ad0f049e1abd8108d30 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: remove "struct subsystem" as it is no longer needed sysfs: printk format warning DOC: Fix wrong identifier name in Documentation/driver-model/devres.txt platform: reorder platform_device_del Driver core: fix show_uevent from taking up way too much stack
Diffstat (limited to 'fs/sysfs')
-rw-r--r--fs/sysfs/bin.c2
-rw-r--r--fs/sysfs/file.c11
2 files changed, 6 insertions, 7 deletions
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index 8ea2a51ce883..d3b9f5f07db1 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -59,7 +59,7 @@ read(struct file * file, char __user * userbuf, size_t count, loff_t * off)
59 if (copy_to_user(userbuf, buffer, count)) 59 if (copy_to_user(userbuf, buffer, count))
60 return -EFAULT; 60 return -EFAULT;
61 61
62 pr_debug("offs = %lld, *off = %lld, count = %d\n", offs, *off, count); 62 pr_debug("offs = %lld, *off = %lld, count = %zd\n", offs, *off, count);
63 63
64 *off = offs + count; 64 *off = offs + count;
65 65
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 @@
24static ssize_t 23static ssize_t
25subsys_attr_show(struct kobject * kobj, struct attribute * attr, char * page) 24subsys_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
37subsys_attr_store(struct kobject * kobj, struct attribute * attr, 36subsys_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