diff options
author | Simon Glass | 2022-08-11 19:34:59 -0600 |
---|---|---|
committer | Tom Rini | 2022-09-16 11:05:16 -0400 |
commit | e33a5c6be55e7c012b2851f9bdf90e7f607e72bf (patch) | |
tree | 19041e9f1b54a5d2811c96e88132ba44fe31243b /cmd/mmc.c | |
parent | adbfe8edc3389ba635229195a95217d8b0dfa182 (diff) |
blk: Switch over to using uclass IDs
We currently have an if_type (interface type) and a uclass id. These are
closely related and we don't need to have both.
Drop the if_type values and use the uclass ones instead.
Maintain the existing, subtle, one-way conversion between UCLASS_USB and
UCLASS_MASS_STORAGE for now, and add a comment.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/mmc.c')
-rw-r--r-- | cmd/mmc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/mmc.c b/cmd/mmc.c index 7bd4cd9e016..0f1f4e0a71d 100644 --- a/cmd/mmc.c +++ b/cmd/mmc.c @@ -331,13 +331,13 @@ static int do_mmcrpmb(struct cmd_tbl *cmdtp, int flag, #else original_part = mmc_get_blk_desc(mmc)->hwpart; #endif - if (blk_select_hwpart_devnum(IF_TYPE_MMC, curr_device, MMC_PART_RPMB) != + if (blk_select_hwpart_devnum(UCLASS_MMC, curr_device, MMC_PART_RPMB) != 0) return CMD_RET_FAILURE; ret = cp->cmd(cmdtp, flag, argc, argv); /* Return to original partition */ - if (blk_select_hwpart_devnum(IF_TYPE_MMC, curr_device, original_part) != + if (blk_select_hwpart_devnum(UCLASS_MMC, curr_device, original_part) != 0) return CMD_RET_FAILURE; return ret; @@ -530,7 +530,7 @@ static int do_mmc_part(struct cmd_tbl *cmdtp, int flag, if (!mmc) return CMD_RET_FAILURE; - mmc_dev = blk_get_devnum_by_type(IF_TYPE_MMC, curr_device); + mmc_dev = blk_get_devnum_by_type(UCLASS_MMC, curr_device); if (mmc_dev != NULL && mmc_dev->type != DEV_TYPE_UNKNOWN) { part_print(mmc_dev); return CMD_RET_SUCCESS; @@ -580,7 +580,7 @@ static int do_mmc_dev(struct cmd_tbl *cmdtp, int flag, if (!mmc) return CMD_RET_FAILURE; - ret = blk_select_hwpart_devnum(IF_TYPE_MMC, dev, part); + ret = blk_select_hwpart_devnum(UCLASS_MMC, dev, part); printf("switch to partitions #%d, %s\n", part, (!ret) ? "OK" : "ERROR"); if (ret) |