aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass2022-08-11 19:34:56 -0600
committerTom Rini2022-09-16 11:05:16 -0400
commitb8f8f6c8702368a5e6bd6e58556c03d5f8e3f1c7 (patch)
treead76e4ed2a12a48f4e524c6c4699b0586db6184a
parent1dbe71fbb83891967cd4ce58118e008b03a90e73 (diff)
blk: Rename var in blk_get_devnum_by_typename()
At present we use a variable with the same name as the enum. Change this since we plan to #define the enum to uclass_id. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--drivers/block/blk-uclass.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c
index 2fa6a7e6883..3738517d8d0 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -90,21 +90,21 @@ struct blk_desc *blk_get_devnum_by_type(enum if_type if_type, int devnum)
struct blk_desc *blk_get_devnum_by_typename(const char *if_typename, int devnum)
{
enum uclass_id uclass_id;
- enum if_type if_type;
+ enum if_type type;
struct udevice *dev;
struct uclass *uc;
int ret;
- if_type = if_typename_to_iftype(if_typename);
- if (if_type == IF_TYPE_UNKNOWN) {
+ type = if_typename_to_iftype(if_typename);
+ if (type == IF_TYPE_UNKNOWN) {
debug("%s: Unknown interface type '%s'\n", __func__,
if_typename);
return NULL;
}
- uclass_id = if_type_to_uclass_id(if_type);
+ uclass_id = if_type_to_uclass_id(type);
if (uclass_id == UCLASS_INVALID) {
debug("%s: Unknown uclass for interface type'\n",
- if_typename_str[if_type]);
+ if_typename_str[type]);
return NULL;
}
@@ -115,7 +115,7 @@ struct blk_desc *blk_get_devnum_by_typename(const char *if_typename, int devnum)
struct blk_desc *desc = dev_get_uclass_plat(dev);
debug("%s: if_type=%d, devnum=%d: %s, %d, %d\n", __func__,
- if_type, devnum, dev->name, desc->if_type, desc->devnum);
+ type, devnum, dev->name, desc->if_type, desc->devnum);
if (desc->devnum != devnum)
continue;