diff options
Diffstat (limited to 'drivers/base/class.c')
| -rw-r--r-- | drivers/base/class.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c index 8e231d05b400..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; |
| @@ -276,25 +276,6 @@ void class_destroy(struct class *cls) | |||
| 276 | class_unregister(cls); | 276 | class_unregister(cls); |
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | #ifdef CONFIG_SYSFS_DEPRECATED | ||
| 280 | char *make_class_name(const char *name, struct kobject *kobj) | ||
| 281 | { | ||
| 282 | char *class_name; | ||
| 283 | int size; | ||
| 284 | |||
| 285 | size = strlen(name) + strlen(kobject_name(kobj)) + 2; | ||
| 286 | |||
| 287 | class_name = kmalloc(size, GFP_KERNEL); | ||
| 288 | if (!class_name) | ||
| 289 | return NULL; | ||
| 290 | |||
| 291 | strcpy(class_name, name); | ||
| 292 | strcat(class_name, ":"); | ||
| 293 | strcat(class_name, kobject_name(kobj)); | ||
| 294 | return class_name; | ||
| 295 | } | ||
| 296 | #endif | ||
| 297 | |||
| 298 | /** | 279 | /** |
| 299 | * class_dev_iter_init - initialize class device iterator | 280 | * class_dev_iter_init - initialize class device iterator |
| 300 | * @iter: class iterator to initialize | 281 | * @iter: class iterator to initialize |
