diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-03 14:37:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-03 14:37:15 -0400 |
commit | 542a086ac72fb193cbc1b996963a572269e57743 (patch) | |
tree | b137c08037cca4ffc8a156a891a01113b3b8edce /fs/sysfs/sysfs.h | |
parent | 1d1fdd95df681f0c065d90ffaafa215a0e8825e2 (diff) | |
parent | 1eeeef153c02f5856ec109fa532eb5f31c39f85c (diff) |
Merge tag 'driver-core-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core patches from Greg KH:
"Here's the big driver core pull request for 3.12-rc1.
Lots of tiny changes here fixing up the way sysfs attributes are
created, to try to make drivers simpler, and fix a whole class race
conditions with creations of device attributes after the device was
announced to userspace.
All the various pieces are acked by the different subsystem
maintainers"
* tag 'driver-core-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (119 commits)
firmware loader: fix pending_fw_head list corruption
drivers/base/memory.c: introduce help macro to_memory_block
dynamic debug: line queries failing due to uninitialized local variable
sysfs: sysfs_create_groups returns a value.
debugfs: provide debugfs_create_x64() when disabled
rbd: convert bus code to use bus_groups
firmware: dcdbas: use binary attribute groups
sysfs: add sysfs_create/remove_groups for when SYSFS is not enabled
driver core: add #include <linux/sysfs.h> to core files.
HID: convert bus code to use dev_groups
Input: serio: convert bus code to use drv_groups
Input: gameport: convert bus code to use drv_groups
driver core: firmware: use __ATTR_RW()
driver core: core: use DEVICE_ATTR_RO
driver core: bus: use DRIVER_ATTR_WO()
driver core: create write-only attribute macros for devices and drivers
sysfs: create __ATTR_WO()
driver-core: platform: convert bus code to use dev_groups
workqueue: convert bus code to use dev_groups
MEI: convert bus code to use dev_groups
...
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r-- | fs/sysfs/sysfs.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index d1e4043eb0c3..b6deca3e301d 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h | |||
@@ -78,7 +78,7 @@ struct sysfs_dirent { | |||
78 | }; | 78 | }; |
79 | 79 | ||
80 | unsigned short s_flags; | 80 | unsigned short s_flags; |
81 | umode_t s_mode; | 81 | umode_t s_mode; |
82 | unsigned int s_ino; | 82 | unsigned int s_ino; |
83 | struct sysfs_inode_attrs *s_iattr; | 83 | struct sysfs_inode_attrs *s_iattr; |
84 | }; | 84 | }; |
@@ -123,9 +123,9 @@ do { \ | |||
123 | key = &attr->skey; \ | 123 | key = &attr->skey; \ |
124 | \ | 124 | \ |
125 | lockdep_init_map(&sd->dep_map, "s_active", key, 0); \ | 125 | lockdep_init_map(&sd->dep_map, "s_active", key, 0); \ |
126 | } while(0) | 126 | } while (0) |
127 | #else | 127 | #else |
128 | #define sysfs_dirent_init_lockdep(sd) do {} while(0) | 128 | #define sysfs_dirent_init_lockdep(sd) do {} while (0) |
129 | #endif | 129 | #endif |
130 | 130 | ||
131 | /* | 131 | /* |
@@ -186,8 +186,8 @@ int sysfs_create_subdir(struct kobject *kobj, const char *name, | |||
186 | struct sysfs_dirent **p_sd); | 186 | struct sysfs_dirent **p_sd); |
187 | void sysfs_remove_subdir(struct sysfs_dirent *sd); | 187 | void sysfs_remove_subdir(struct sysfs_dirent *sd); |
188 | 188 | ||
189 | int sysfs_rename(struct sysfs_dirent *sd, | 189 | int sysfs_rename(struct sysfs_dirent *sd, struct sysfs_dirent *new_parent_sd, |
190 | struct sysfs_dirent *new_parent_sd, const void *ns, const char *new_name); | 190 | const void *ns, const char *new_name); |
191 | 191 | ||
192 | static inline struct sysfs_dirent *__sysfs_get(struct sysfs_dirent *sd) | 192 | static inline struct sysfs_dirent *__sysfs_get(struct sysfs_dirent *sd) |
193 | { | 193 | { |
@@ -214,10 +214,12 @@ void sysfs_evict_inode(struct inode *inode); | |||
214 | int sysfs_sd_setattr(struct sysfs_dirent *sd, struct iattr *iattr); | 214 | int sysfs_sd_setattr(struct sysfs_dirent *sd, struct iattr *iattr); |
215 | int sysfs_permission(struct inode *inode, int mask); | 215 | int sysfs_permission(struct inode *inode, int mask); |
216 | int sysfs_setattr(struct dentry *dentry, struct iattr *iattr); | 216 | int sysfs_setattr(struct dentry *dentry, struct iattr *iattr); |
217 | int sysfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat); | 217 | int sysfs_getattr(struct vfsmount *mnt, struct dentry *dentry, |
218 | struct kstat *stat); | ||
218 | int sysfs_setxattr(struct dentry *dentry, const char *name, const void *value, | 219 | int sysfs_setxattr(struct dentry *dentry, const char *name, const void *value, |
219 | size_t size, int flags); | 220 | size_t size, int flags); |
220 | int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns, const char *name); | 221 | int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns, |
222 | const char *name); | ||
221 | int sysfs_inode_init(void); | 223 | int sysfs_inode_init(void); |
222 | 224 | ||
223 | /* | 225 | /* |