This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / base / class.c
index 54b2012..4317723 100644 (file)
@@ -139,7 +139,7 @@ int class_register(struct class * cls)
 
        INIT_LIST_HEAD(&cls->children);
        INIT_LIST_HEAD(&cls->interfaces);
-       error = kobject_set_name(&cls->subsys.kset.kobj, "%s", cls->name);
+       error = kobject_set_name(&cls->subsys.kset.kobj, cls->name);
        if (error)
                return error;
 
@@ -283,40 +283,8 @@ static int class_hotplug(struct kset *kset, struct kobject *kobj, char **envp,
 {
        struct class_device *class_dev = to_class_dev(kobj);
        int retval = 0;
-       int i = 0;
-       int length = 0;
 
        pr_debug("%s - name = %s\n", __FUNCTION__, class_dev->class_id);
-
-       if (class_dev->dev) {
-               /* add physical device, backing this device  */
-               struct device *dev = class_dev->dev;
-               char *path = kobject_get_path(&dev->kobj, GFP_KERNEL);
-
-               add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size,
-                                   &length, "PHYSDEVPATH=%s", path);
-               kfree(path);
-
-               /* add bus name of physical device */
-               if (dev->bus)
-                       add_hotplug_env_var(envp, num_envp, &i,
-                                           buffer, buffer_size, &length,
-                                           "PHYSDEVBUS=%s", dev->bus->name);
-
-               /* add driver name of physical device */
-               if (dev->driver)
-                       add_hotplug_env_var(envp, num_envp, &i,
-                                           buffer, buffer_size, &length,
-                                           "PHYSDEVDRIVER=%s", dev->driver->name);
-
-               /* terminate, set to next free slot, shrink available space */
-               envp[i] = NULL;
-               envp = &envp[i];
-               num_envp -= i;
-               buffer = &buffer[length];
-               buffer_size -= length;
-       }
-
        if (class_dev->class->hotplug) {
                /* have the bus specific function add its stuff */
                retval = class_dev->class->hotplug (class_dev, envp, num_envp,
@@ -400,7 +368,7 @@ int class_device_add(struct class_device *class_dev)
                 class_dev->class_id);
 
        /* first, register with generic layer. */
-       kobject_set_name(&class_dev->kobj, "%s", class_dev->class_id);
+       kobject_set_name(&class_dev->kobj, class_dev->class_id);
        if (parent)
                class_dev->kobj.parent = &parent->subsys.kset.kobj;