Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187087
b: refs/heads/master
c: 3596025
h: refs/heads/master
i:
  187085: 33c8324
  187083: d02f516
  187079: 57bc34f
  187071: dcf62c0
v: v3
  • Loading branch information
Eric W. Biederman authored and Greg Kroah-Hartman committed Mar 8, 2010
1 parent cf4c3de commit 2f7849b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a07e4156a2ee6359d31a44946d7ee7f85dbf6bca
refs/heads/master: 35960258ed388cdcebdb71df35fd5126978ca325
20 changes: 20 additions & 0 deletions trunk/include/linux/sysfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ struct attribute {
#endif
};

/**
* sysfs_attr_init - initialize a dynamically allocated sysfs attribute
* @attr: struct attribute to initialize
*
* Initialize a dynamically allocated struct attribute so we can
* make lockdep happy. This is a new requirement for attributes
* and initially this is only needed when lockdep is enabled.
* Lockdep gives a nice error when your attribute is added to
* sysfs if you don't have this.
*/
#ifdef CONFIG_DEBUG_LOCK_ALLOC
#define sysfs_attr_init(attr) \
do { \
Expand Down Expand Up @@ -90,6 +100,16 @@ struct bin_attribute {
struct vm_area_struct *vma);
};

/**
* sysfs_bin_attr_init - initialize a dynamically allocated bin_attribute
* @attr: struct bin_attribute to initialize
*
* Initialize a dynamically allocated struct bin_attribute so we
* can make lockdep happy. This is a new requirement for
* attributes and initially this is only needed when lockdep is
* enabled. Lockdep gives a nice error when your attribute is
* added to sysfs if you don't have this.
*/
#define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&bin_attr->attr)

struct sysfs_ops {
Expand Down

0 comments on commit 2f7849b

Please sign in to comment.