From 8faeb1d7220efff3020d7e050d2a1768a3f426f4 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 16 Jul 2023 13:34:44 +0200 Subject: part: eliminate part_get_info_by_name_type() Since commit 56670d6fb83f ("disk: part: use common api to lookup part driver") part_get_info_by_name_type() ignores the part_type parameter used to restrict the partition table type. omap_mmc_get_part_size() and part_get_info_by_name() are the only consumers. omap_mmc_get_part_size() calls with part_type = PART_TYPE_EFI because at the time of implementation a speed up could be gained by passing the partition table type. After 5 years experience without this restriction it looks safe to keep it that way. part_get_info_by_name() uses PART_TYPE_ALL. Move the logic of part_get_info_by_name_type() to part_get_info_by_name() and replace the function in omap_mmc_get_part_size(). Fixes: 56670d6fb83f ("disk: part: use common api to lookup part driver") Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- disk/part.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'disk') diff --git a/disk/part.c b/disk/part.c index 0a03b8213d8..186ee965006 100644 --- a/disk/part.c +++ b/disk/part.c @@ -670,8 +670,8 @@ cleanup: return ret; } -int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name, - struct disk_partition *info, int part_type) +int part_get_info_by_name(struct blk_desc *dev_desc, const char *name, + struct disk_partition *info) { struct part_driver *part_drv; int ret; @@ -702,12 +702,6 @@ int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name, return -ENOENT; } -int part_get_info_by_name(struct blk_desc *dev_desc, const char *name, - struct disk_partition *info) -{ - return part_get_info_by_name_type(dev_desc, name, info, PART_TYPE_ALL); -} - /** * Get partition info from device number and partition name. * -- cgit v1.3.1