[SCSI] struct device - replace bus_id with dev_name(), dev_set_name()
[jejb: limit ioctl to returning 20 characters to avoid overrun on long device names and add a few more conversions] Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:

committed by
James Bottomley

parent
b58602a4ba
commit
71610f55fa
@@ -237,8 +237,7 @@ int raid_component_add(struct raid_template *r,struct device *raid_dev,
|
||||
rc->dev.parent = get_device(component_dev);
|
||||
rc->num = rd->component_count++;
|
||||
|
||||
snprintf(rc->dev.bus_id, sizeof(rc->dev.bus_id),
|
||||
"component-%d", rc->num);
|
||||
dev_set_name(&rc->dev, "component-%d", rc->num);
|
||||
list_add_tail(&rc->node, &rd->component_list);
|
||||
rc->dev.class = &raid_class.class;
|
||||
err = device_add(&rc->dev);
|
||||
|
Reference in New Issue
Block a user