diff options
Diffstat (limited to 'drivers/base/class.c')
-rw-r--r-- | drivers/base/class.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c index 1078969889fd..9c63a5687d69 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c | |||
@@ -184,9 +184,9 @@ int __class_register(struct class *cls, struct lock_class_key *key) | |||
184 | if (!cls->dev_kobj) | 184 | if (!cls->dev_kobj) |
185 | cls->dev_kobj = sysfs_dev_char_kobj; | 185 | cls->dev_kobj = sysfs_dev_char_kobj; |
186 | 186 | ||
187 | #if defined(CONFIG_SYSFS_DEPRECATED) && defined(CONFIG_BLOCK) | 187 | #if defined(CONFIG_BLOCK) |
188 | /* let the block class directory show up in the root of sysfs */ | 188 | /* let the block class directory show up in the root of sysfs */ |
189 | if (cls != &block_class) | 189 | if (!sysfs_deprecated || cls != &block_class) |
190 | cp->class_subsys.kobj.kset = class_kset; | 190 | cp->class_subsys.kobj.kset = class_kset; |
191 | #else | 191 | #else |
192 | cp->class_subsys.kobj.kset = class_kset; | 192 | cp->class_subsys.kobj.kset = class_kset; |