summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Mochel <mochel@osdl.org>2002-10-29 20:27:36 -0800
committerPatrick Mochel <mochel@osdl.org>2002-10-29 20:27:36 -0800
commit332ad69da7aca8bdcd3f873bb2bfeb9d9a6d1f98 (patch)
treeefca0e105baeedb8d1e5fdf55d004f7e9f88a9ec /include
parenta6c066de9d449b0bbe2efbf6431b19c270e02060 (diff)
sysfs: kill struct sysfs_dir.
Previously, sysfs read() and write() calls looked for sysfs_ops in the struct sysfs_dir, in the kobject. Since objects belong to a subsystem, and is a member of a group of like devices, the sysfs_ops have been moved to struct subsystem, and are referenced from there. The only remaining member of struct sysfs_dir is the dentry of the object's directory. That is moved out of the dir struct and directly into struct kobject. That saves us 4 bytes/object. All of the sysfs functions that referenced the struct have been changed to just reference the dentry.
Diffstat (limited to 'include')
-rw-r--r--include/linux/kobject.h2
-rw-r--r--include/linux/sysfs.h5
2 files changed, 1 insertions, 6 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 32dfaaf52d88..5b236b6678cb 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -18,7 +18,7 @@ struct kobject {
struct list_head entry;
struct kobject * parent;
struct subsystem * subsys;
- struct sysfs_dir dir;
+ struct dentry * dentry;
};
extern void kobject_init(struct kobject *);
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 066a9ccc0fb4..7a46c9f0c308 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -18,11 +18,6 @@ struct sysfs_ops {
ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t, loff_t);
};
-struct sysfs_dir {
- struct dentry * dentry;
- struct sysfs_ops * ops;
-};
-
struct attribute {
char * name;
mode_t mode;