Skip to content
Snippets Groups Projects
Commit 1330a726 authored by Jean-Jacques Hiblot's avatar Jean-Jacques Hiblot Committed by Simon Glass
Browse files

scsi: move the partition initialization out of the scsi detection


We might want to get information about the scsi device without initializing the partition.

Signed-off-by: default avatarJean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent e39cecfd
No related branches found
No related tags found
No related merge requests found
......@@ -540,7 +540,6 @@ static int scsi_detect_dev(int target, int lun, struct blk_desc *dev_desc)
dev_desc->blksz = blksz;
dev_desc->log2blksz = LOG2(dev_desc->blksz);
dev_desc->type = perq;
part_init(&dev_desc[0]);
removable:
return 0;
}
......@@ -605,6 +604,7 @@ int scsi_scan(int mode)
device_unbind(bdev);
continue;
}
part_init(bdesc);
if (mode == 1) {
printf(" Device %d: ", 0);
......@@ -634,6 +634,7 @@ int scsi_scan(int mode)
&scsi_dev_desc[scsi_max_devs]);
if (ret)
continue;
part_init(&scsi_dev_desc[scsi_max_devs]);
if (mode == 1) {
printf(" Device %d: ", 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment