regmap: irq: Only update mask bits when doing initial mask
[linux-2.6.git] / drivers / base / attribute_container.c
index f57652d..8fc200b 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;