diff options
author | Pekka Enberg <penberg@kernel.org> | 2010-10-24 18:57:05 +0200 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2010-10-24 18:57:05 +0200 |
commit | 6d4121f6c20a0e86231d52f535f1c82423b3326f (patch) | |
tree | 5c235cac699ca86b504850aa663ddadde0455a61 /drivers/base/class.c | |
parent | SLUB: Fix memory hotplug with !NUMA (diff) | |
parent | Merge branch 'for-2.6.37/core' of git://git.kernel.dk/linux-2.6-block (diff) | |
download | linux-6d4121f6c20a0e86231d52f535f1c82423b3326f.tar.xz linux-6d4121f6c20a0e86231d52f535f1c82423b3326f.zip |
Merge branch 'master' into for-linus
Conflicts:
include/linux/percpu.h
mm/percpu.c
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) if (!cls->dev_kobj) cls->dev_kobj = sysfs_dev_char_kobj; -#if defined(CONFIG_SYSFS_DEPRECATED) && defined(CONFIG_BLOCK) +#if defined(CONFIG_BLOCK) /* let the block class directory show up in the root of sysfs */ - if (cls != &block_class) + if (!sysfs_deprecated || cls != &block_class) cp->class_subsys.kobj.kset = class_kset; #else cp->class_subsys.kobj.kset = class_kset; @@ -276,25 +276,6 @@ void class_destroy(struct class *cls) class_unregister(cls); } -#ifdef CONFIG_SYSFS_DEPRECATED -char *make_class_name(const char *name, struct kobject *kobj) -{ - char *class_name; - int size; - - size = strlen(name) + strlen(kobject_name(kobj)) + 2; - - class_name = kmalloc(size, GFP_KERNEL); - if (!class_name) - return NULL; - - strcpy(class_name, name); - strcat(class_name, ":"); - strcat(class_name, kobject_name(kobj)); - return class_name; -} -#endif - /** * class_dev_iter_init - initialize class device iterator * @iter: class iterator to initialize |