diff options
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r-- | include/linux/sysfs.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 0010009b2f00..381f06db2fe5 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -27,6 +27,7 @@ struct attribute { const char *name; umode_t mode; #ifdef CONFIG_DEBUG_LOCK_ALLOC + bool ignore_lockdep:1; struct lock_class_key *key; struct lock_class_key skey; #endif @@ -80,6 +81,17 @@ struct attribute_group { #define __ATTR_NULL { .attr = { .name = NULL } } +#ifdef CONFIG_DEBUG_LOCK_ALLOC +#define __ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) { \ + .attr = {.name = __stringify(_name), .mode = _mode, \ + .ignore_lockdep = true }, \ + .show = _show, \ + .store = _store, \ +} +#else +#define __ATTR_IGNORE_LOCKDEP __ATTR +#endif + #define attr_name(_attr) (_attr).attr.name struct file; |