aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/raid_class.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-12-03 16:41:36 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-01-02 11:22:16 -0500
commit71610f55fa4db63dbf5385929a47c9fb2451f332 (patch)
treeb816672eef25e1436111e6c78053612bd22fb016 /drivers/scsi/raid_class.c
parentb58602a4bac012b5f4fc12fe6b46ab237b610d5d (diff)
[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>
Diffstat (limited to 'drivers/scsi/raid_class.c')
-rw-r--r--drivers/scsi/raid_class.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/raid_class.c b/drivers/scsi/raid_class.c
index 913a931176ef..8e5c169b03fb 100644
--- a/drivers/scsi/raid_class.c
+++ b/drivers/scsi/raid_class.c
@@ -237,8 +237,7 @@ int raid_component_add(struct raid_template *r,struct device *raid_dev,
237 rc->dev.parent = get_device(component_dev); 237 rc->dev.parent = get_device(component_dev);
238 rc->num = rd->component_count++; 238 rc->num = rd->component_count++;
239 239
240 snprintf(rc->dev.bus_id, sizeof(rc->dev.bus_id), 240 dev_set_name(&rc->dev, "component-%d", rc->num);
241 "component-%d", rc->num);
242 list_add_tail(&rc->node, &rd->component_list); 241 list_add_tail(&rc->node, &rd->component_list);
243 rc->dev.class = &raid_class.class; 242 rc->dev.class = &raid_class.class;
244 err = device_add(&rc->dev); 243 err = device_add(&rc->dev);