]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/base/attribute_container.c
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / drivers / base / attribute_container.c
index f57652db0a2a1261ef79e0c59326be6163bcaa1c..8fc200b2e2c0a3ceed42364b467a2ea26b574fcf 100644 (file)
@@ -167,7 +167,7 @@ attribute_container_add_device(struct device *dev,
                ic->classdev.parent = get_device(dev);
                ic->classdev.class = cont->class;
                cont->class->dev_release = attribute_container_release;
-               strcpy(ic->classdev.bus_id, dev->bus_id);
+               dev_set_name(&ic->classdev, dev_name(dev));
                if (fn)
                        fn(cont, dev, &ic->classdev);
                else
@@ -328,6 +328,7 @@ attribute_container_add_attrs(struct device *classdev)
                return sysfs_create_group(&classdev->kobj, cont->grp);
 
        for (i = 0; attrs[i]; i++) {
+               sysfs_attr_init(&attrs[i]->attr);
                error = device_create_file(classdev, attrs[i]);
                if (error)
                        return error;