diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:22:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:22:26 -0500 |
commit | f2aca47dc3c2d0c2d5dbd972558557e74232bbce (patch) | |
tree | eae58f599a25a1f3ab41bf616a2b7c4b3c6e2277 /fs/sysfs/sysfs.h | |
parent | 7677ced48e2bbbb8d847d34f37e5d96d2b0e41e4 (diff) | |
parent | b592fcfe7f06c15ec11774b5be7ce0de3aa86e73 (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: (28 commits)
sysfs: Shadow directory support
Driver Core: Increase the default timeout value of the firmware subsystem
Driver core: allow to delay the uevent at device creation time
Driver core: add device_type to struct device
Driver core: add uevent vars for devices of a class
SYSFS: Fix missing include of list.h in sysfs.h
HOWTO: Add a reference to Harbison and Steele
sysfs: error handling in sysfs, fill_read_buffer()
kobject: kobject_put cleanup
sysfs: kobject_put cleanup
sysfs: suppress lockdep warnings
Driver core: fix race in sysfs between sysfs_remove_file() and read()/write()
driver core: Change function call order in device_bind_driver().
driver core: Don't stop probing on ->probe errors.
driver core fixes: device_register() retval check in platform.c
driver core fixes: make_class_name() retval checks
/sys/modules/*/holders
USB: add the sysfs driver name to all modules
SERIO: add the sysfs driver name to all modules
PCI: add the sysfs driver name to all modules
...
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r-- | fs/sysfs/sysfs.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index bd7cec295dab..fe1cbfd208ed 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h | |||
@@ -2,6 +2,7 @@ | |||
2 | extern struct vfsmount * sysfs_mount; | 2 | extern struct vfsmount * sysfs_mount; |
3 | extern struct kmem_cache *sysfs_dir_cachep; | 3 | extern struct kmem_cache *sysfs_dir_cachep; |
4 | 4 | ||
5 | extern void sysfs_delete_inode(struct inode *inode); | ||
5 | extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *); | 6 | extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *); |
6 | extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *)); | 7 | extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *)); |
7 | 8 | ||
@@ -33,6 +34,22 @@ struct sysfs_symlink { | |||
33 | struct kobject * target_kobj; | 34 | struct kobject * target_kobj; |
34 | }; | 35 | }; |
35 | 36 | ||
37 | struct sysfs_buffer { | ||
38 | struct list_head associates; | ||
39 | size_t count; | ||
40 | loff_t pos; | ||
41 | char * page; | ||
42 | struct sysfs_ops * ops; | ||
43 | struct semaphore sem; | ||
44 | int orphaned; | ||
45 | int needs_read_fill; | ||
46 | int event; | ||
47 | }; | ||
48 | |||
49 | struct sysfs_buffer_collection { | ||
50 | struct list_head associates; | ||
51 | }; | ||
52 | |||
36 | static inline struct kobject * to_kobj(struct dentry * dentry) | 53 | static inline struct kobject * to_kobj(struct dentry * dentry) |
37 | { | 54 | { |
38 | struct sysfs_dirent * sd = dentry->d_fsdata; | 55 | struct sysfs_dirent * sd = dentry->d_fsdata; |
@@ -96,3 +113,7 @@ static inline void sysfs_put(struct sysfs_dirent * sd) | |||
96 | release_sysfs_dirent(sd); | 113 | release_sysfs_dirent(sd); |
97 | } | 114 | } |
98 | 115 | ||
116 | static inline int sysfs_is_shadowed_inode(struct inode *inode) | ||
117 | { | ||
118 | return S_ISDIR(inode->i_mode) && inode->i_op->follow_link; | ||
119 | } | ||