diff options
author | Jean-Jacques Hiblot | 2017-04-07 13:42:07 +0200 |
---|---|---|
committer | Simon Glass | 2017-04-14 19:38:57 -0600 |
commit | 1330a726ff0c8164cf6035ab4a6d1e31805f69d1 (patch) | |
tree | d53888aee3bf13482cd29afb9bdb3bb647e88179 /common | |
parent | e39cecfdaf8ee6fa222a8209aa0183be978f370d (diff) |
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: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/scsi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/scsi.c b/common/scsi.c index d55ba892a6f..972ef338be6 100644 --- a/common/scsi.c +++ b/common/scsi.c @@ -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); |