summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2021-12-10 15:49:28 +0900
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2021-12-18 12:05:19 +0100
commit5d21dfec4ac92f8b38130660ed9c4d22712ecab5 (patch)
tree751c8964fc119fb02b220c17a2d1010d46d50967
parent35f3ef93d6eda8a4c5424872f8f6d7436540d433 (diff)
downloadu-boot-5d21dfec4ac92f8b38130660ed9c4d22712ecab5.tar.gz
u-boot-5d21dfec4ac92f8b38130660ed9c4d22712ecab5.tar.bz2
u-boot-5d21dfec4ac92f8b38130660ed9c4d22712ecab5.zip
part: call part_init() in blk_get_device_by_str() only for MMC
In blk_get_device_by_str(), the comment says: "Updates the partition table for the specified hw partition." Since hw partition is supported only on MMC, it makes no sense to do so for other devices. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--disk/part.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/disk/part.c b/disk/part.c
index e857a9f958..99f592d96c 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -430,7 +430,8 @@ int blk_get_device_by_str(const char *ifname, const char *dev_hwpart_str,
* Always should be done, otherwise hw partition 0 will return stale
* data after displaying a non-zero hw partition.
*/
- part_init(*dev_desc);
+ if ((*dev_desc)->if_type == IF_TYPE_MMC)
+ part_init(*dev_desc);
#endif
cleanup: