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>
This commit is contained in:
Simon Glass
2022-08-11 19:34:59 -06:00
committed by Tom Rini
parent adbfe8edc3
commit e33a5c6be5
41 changed files with 151 additions and 159 deletions

View File

@@ -122,7 +122,7 @@ static int __bcb_load(int devnum, const char *partp)
char *endp;
int part, ret;
desc = blk_get_devnum_by_type(IF_TYPE_MMC, devnum);
desc = blk_get_devnum_by_type(UCLASS_MMC, devnum);
if (!desc) {
ret = -ENODEV;
goto err_read_fail;
@@ -287,7 +287,7 @@ static int __bcb_store(void)
u64 cnt;
int ret;
desc = blk_get_devnum_by_type(IF_TYPE_MMC, bcb_dev);
desc = blk_get_devnum_by_type(UCLASS_MMC, bcb_dev);
if (!desc) {
ret = -ENODEV;
goto err;