From 2f7849b30cee836ea490272e00dfeff7edbb7ee8 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Fri, 12 Feb 2010 04:35:32 -0800 Subject: [PATCH] --- yaml --- r: 187087 b: refs/heads/master c: 35960258ed388cdcebdb71df35fd5126978ca325 h: refs/heads/master i: 187085: 33c8324fa52c011fefdf2259347700bc98c00d65 187083: d02f516bfa3a5901495552f9f4949f402b425eb4 187079: 57bc34fcd88a31ed7758c3db0d887263df11fb8d 187071: dcf62c0e17a27687126bf985233a9d18787ca52d v: v3 --- [refs] | 2 +- trunk/include/linux/sysfs.h | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index da87614a9ea6..b178e70c3c71 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a07e4156a2ee6359d31a44946d7ee7f85dbf6bca +refs/heads/master: 35960258ed388cdcebdb71df35fd5126978ca325 diff --git a/trunk/include/linux/sysfs.h b/trunk/include/linux/sysfs.h index 006c359e63c0..5b8f80f5aca6 100644 --- a/trunk/include/linux/sysfs.h +++ b/trunk/include/linux/sysfs.h @@ -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 { \ @@ -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 {