X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fbase%2Fattribute_container.c;h=8fc200b2e2c0a3ceed42364b467a2ea26b574fcf;hb=48de8cb7847d040c8892701c1ff3c55eff1f46b4;hp=f57652db0a2a1261ef79e0c59326be6163bcaa1c;hpb=c2a3b233450d5bc426c063ea2d8a74351db29ea4;p=karo-tx-linux.git diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c index f57652db0a2a..8fc200b2e2c0 100644 --- a/drivers/base/attribute_container.c +++ b/drivers/base/attribute_container.c @@ -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;