aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sysfs.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-07 22:22:26 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-07 22:22:26 -0500
commitf2aca47dc3c2d0c2d5dbd972558557e74232bbce (patch)
treeeae58f599a25a1f3ab41bf616a2b7c4b3c6e2277 /include/linux/sysfs.h
parent7677ced48e2bbbb8d847d34f37e5d96d2b0e41e4 (diff)
parentb592fcfe7f06c15ec11774b5be7ce0de3aa86e73 (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 'include/linux/sysfs.h')
-rw-r--r--include/linux/sysfs.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 2129d1b6c874..192de3afa96b 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -11,10 +11,12 @@
11#define _SYSFS_H_ 11#define _SYSFS_H_
12 12
13#include <linux/compiler.h> 13#include <linux/compiler.h>
14#include <linux/list.h>
14#include <asm/atomic.h> 15#include <asm/atomic.h>
15 16
16struct kobject; 17struct kobject;
17struct module; 18struct module;
19struct nameidata;
18 20
19struct attribute { 21struct attribute {
20 const char * name; 22 const char * name;
@@ -88,13 +90,13 @@ struct sysfs_dirent {
88#ifdef CONFIG_SYSFS 90#ifdef CONFIG_SYSFS
89 91
90extern int __must_check 92extern int __must_check
91sysfs_create_dir(struct kobject *); 93sysfs_create_dir(struct kobject *, struct dentry *);
92 94
93extern void 95extern void
94sysfs_remove_dir(struct kobject *); 96sysfs_remove_dir(struct kobject *);
95 97
96extern int __must_check 98extern int __must_check
97sysfs_rename_dir(struct kobject *, const char *new_name); 99sysfs_rename_dir(struct kobject *, struct dentry *, const char *new_name);
98 100
99extern int __must_check 101extern int __must_check
100sysfs_move_dir(struct kobject *, struct kobject *); 102sysfs_move_dir(struct kobject *, struct kobject *);
@@ -126,11 +128,17 @@ int __must_check sysfs_create_group(struct kobject *,
126void sysfs_remove_group(struct kobject *, const struct attribute_group *); 128void sysfs_remove_group(struct kobject *, const struct attribute_group *);
127void sysfs_notify(struct kobject * k, char *dir, char *attr); 129void sysfs_notify(struct kobject * k, char *dir, char *attr);
128 130
131
132extern int sysfs_make_shadowed_dir(struct kobject *kobj,
133 void * (*follow_link)(struct dentry *, struct nameidata *));
134extern struct dentry *sysfs_create_shadow_dir(struct kobject *kobj);
135extern void sysfs_remove_shadow_dir(struct dentry *dir);
136
129extern int __must_check sysfs_init(void); 137extern int __must_check sysfs_init(void);
130 138
131#else /* CONFIG_SYSFS */ 139#else /* CONFIG_SYSFS */
132 140
133static inline int sysfs_create_dir(struct kobject * k) 141static inline int sysfs_create_dir(struct kobject * k, struct dentry *shadow)
134{ 142{
135 return 0; 143 return 0;
136} 144}
@@ -140,7 +148,9 @@ static inline void sysfs_remove_dir(struct kobject * k)
140 ; 148 ;
141} 149}
142 150
143static inline int sysfs_rename_dir(struct kobject * k, const char *new_name) 151static inline int sysfs_rename_dir(struct kobject * k,
152 struct dentry *new_parent,
153 const char *new_name)
144{ 154{
145 return 0; 155 return 0;
146} 156}
@@ -204,6 +214,12 @@ static inline void sysfs_notify(struct kobject * k, char *dir, char *attr)
204{ 214{
205} 215}
206 216
217static inline int sysfs_make_shadowed_dir(struct kobject *kobj,
218 void * (*follow_link)(struct dentry *, struct nameidata *))
219{
220 return 0;
221}
222
207static inline int __must_check sysfs_init(void) 223static inline int __must_check sysfs_init(void)
208{ 224{
209 return 0; 225 return 0;