diff options
-rw-r--r-- | block/bsg.c | 6 | ||||
-rw-r--r-- | block/genhd.c | 2 | ||||
-rw-r--r-- | fs/partitions/check.c | 11 |
3 files changed, 7 insertions, 12 deletions
diff --git a/block/bsg.c b/block/bsg.c index e73e50daf3d0..d414bb5607e8 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
@@ -42,7 +42,7 @@ struct bsg_device { | |||
42 | int done_cmds; | 42 | int done_cmds; |
43 | wait_queue_head_t wq_done; | 43 | wait_queue_head_t wq_done; |
44 | wait_queue_head_t wq_free; | 44 | wait_queue_head_t wq_free; |
45 | char name[BUS_ID_SIZE]; | 45 | char name[20]; |
46 | int max_queue; | 46 | int max_queue; |
47 | unsigned long flags; | 47 | unsigned long flags; |
48 | }; | 48 | }; |
@@ -781,7 +781,7 @@ static struct bsg_device *bsg_add_device(struct inode *inode, | |||
781 | mutex_lock(&bsg_mutex); | 781 | mutex_lock(&bsg_mutex); |
782 | hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(iminor(inode))); | 782 | hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(iminor(inode))); |
783 | 783 | ||
784 | strncpy(bd->name, rq->bsg_dev.class_dev->bus_id, sizeof(bd->name) - 1); | 784 | strncpy(bd->name, dev_name(rq->bsg_dev.class_dev), sizeof(bd->name) - 1); |
785 | dprintk("bound to <%s>, max queue %d\n", | 785 | dprintk("bound to <%s>, max queue %d\n", |
786 | format_dev_t(buf, inode->i_rdev), bd->max_queue); | 786 | format_dev_t(buf, inode->i_rdev), bd->max_queue); |
787 | 787 | ||
@@ -992,7 +992,7 @@ int bsg_register_queue(struct request_queue *q, struct device *parent, | |||
992 | if (name) | 992 | if (name) |
993 | devname = name; | 993 | devname = name; |
994 | else | 994 | else |
995 | devname = parent->bus_id; | 995 | devname = dev_name(parent); |
996 | 996 | ||
997 | /* | 997 | /* |
998 | * we need a proper transport to send commands, not a stacked device | 998 | * we need a proper transport to send commands, not a stacked device |
diff --git a/block/genhd.c b/block/genhd.c index d84a7df1e2a0..397960cf26af 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
@@ -1084,7 +1084,7 @@ dev_t blk_lookup_devt(const char *name, int partno) | |||
1084 | struct gendisk *disk = dev_to_disk(dev); | 1084 | struct gendisk *disk = dev_to_disk(dev); |
1085 | struct hd_struct *part; | 1085 | struct hd_struct *part; |
1086 | 1086 | ||
1087 | if (strcmp(dev->bus_id, name)) | 1087 | if (strcmp(dev_name(dev), name)) |
1088 | continue; | 1088 | continue; |
1089 | 1089 | ||
1090 | part = disk_get_part(disk, partno); | 1090 | part = disk_get_part(disk, partno); |
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 6d5b213b8a9b..5198ada67398 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -384,9 +384,9 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno, | |||
384 | 384 | ||
385 | dname = dev_name(ddev); | 385 | dname = dev_name(ddev); |
386 | if (isdigit(dname[strlen(dname) - 1])) | 386 | if (isdigit(dname[strlen(dname) - 1])) |
387 | snprintf(pdev->bus_id, BUS_ID_SIZE, "%sp%d", dname, partno); | 387 | dev_set_name(pdev, "%sp%d", dname, partno); |
388 | else | 388 | else |
389 | snprintf(pdev->bus_id, BUS_ID_SIZE, "%s%d", dname, partno); | 389 | dev_set_name(pdev, "%s%d", dname, partno); |
390 | 390 | ||
391 | device_initialize(pdev); | 391 | device_initialize(pdev); |
392 | pdev->class = &block_class; | 392 | pdev->class = &block_class; |
@@ -447,16 +447,11 @@ void register_disk(struct gendisk *disk) | |||
447 | struct block_device *bdev; | 447 | struct block_device *bdev; |
448 | struct disk_part_iter piter; | 448 | struct disk_part_iter piter; |
449 | struct hd_struct *part; | 449 | struct hd_struct *part; |
450 | char *s; | ||
451 | int err; | 450 | int err; |
452 | 451 | ||
453 | ddev->parent = disk->driverfs_dev; | 452 | ddev->parent = disk->driverfs_dev; |
454 | 453 | ||
455 | strlcpy(ddev->bus_id, disk->disk_name, BUS_ID_SIZE); | 454 | dev_set_name(ddev, disk->disk_name); |
456 | /* ewww... some of these buggers have / in the name... */ | ||
457 | s = strchr(ddev->bus_id, '/'); | ||
458 | if (s) | ||
459 | *s = '!'; | ||
460 | 455 | ||
461 | /* delay uevents, until we scanned partition table */ | 456 | /* delay uevents, until we scanned partition table */ |
462 | ddev->uevent_suppress = 1; | 457 | ddev->uevent_suppress = 1; |