mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 18:04:48 +00:00
disk: don't try search for partition type if already set
Block devices can already set partition type at initialization stage, so, in this case is no point in searching for partition type. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
This commit is contained in:
parent
9daad11ad1
commit
6b0c9f2cb5
1 changed files with 7 additions and 0 deletions
|
@ -285,6 +285,13 @@ void part_init(struct blk_desc *desc)
|
|||
|
||||
blkcache_invalidate(desc->uclass_id, desc->devnum);
|
||||
|
||||
if (desc->part_type != PART_TYPE_UNKNOWN) {
|
||||
for (entry = drv; entry != drv + n_ents; entry++) {
|
||||
if (entry->part_type == desc->part_type && !entry->test(desc))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
desc->part_type = PART_TYPE_UNKNOWN;
|
||||
for (entry = drv; entry != drv + n_ents; entry++) {
|
||||
int ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue