dm: part: Rename some partition functions
Rename three partition functions so that they start with part_. This makes it clear what they relate to. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
@@ -25,12 +25,12 @@ struct fb_mmc_sparse {
|
||||
struct blk_desc *dev_desc;
|
||||
};
|
||||
|
||||
static int get_partition_info_efi_by_name_or_alias(struct blk_desc *dev_desc,
|
||||
static int part_get_info_efi_by_name_or_alias(struct blk_desc *dev_desc,
|
||||
const char *name, disk_partition_t *info)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = get_partition_info_efi_by_name(dev_desc, name, info);
|
||||
ret = part_get_info_efi_by_name(dev_desc, name, info);
|
||||
if (ret) {
|
||||
/* strlen("fastboot_partition_alias_") + 32(part_name) + 1 */
|
||||
char env_alias_name[25 + 32 + 1];
|
||||
@@ -41,7 +41,7 @@ static int get_partition_info_efi_by_name_or_alias(struct blk_desc *dev_desc,
|
||||
strncat(env_alias_name, name, 32);
|
||||
aliased_part_name = getenv(env_alias_name);
|
||||
if (aliased_part_name != NULL)
|
||||
ret = get_partition_info_efi_by_name(dev_desc,
|
||||
ret = part_get_info_efi_by_name(dev_desc,
|
||||
aliased_part_name, info);
|
||||
}
|
||||
return ret;
|
||||
@@ -131,7 +131,7 @@ void fb_mmc_flash_write(const char *cmd, unsigned int session_id,
|
||||
printf("........ success\n");
|
||||
fastboot_okay(response_str, "");
|
||||
return;
|
||||
} else if (get_partition_info_efi_by_name_or_alias(dev_desc, cmd, &info)) {
|
||||
} else if (part_get_info_efi_by_name_or_alias(dev_desc, cmd, &info)) {
|
||||
error("cannot find partition: '%s'\n", cmd);
|
||||
fastboot_fail(response_str, "cannot find partition");
|
||||
return;
|
||||
@@ -186,7 +186,7 @@ void fb_mmc_erase(const char *cmd, char *response)
|
||||
return;
|
||||
}
|
||||
|
||||
ret = get_partition_info_efi_by_name_or_alias(dev_desc, cmd, &info);
|
||||
ret = part_get_info_efi_by_name_or_alias(dev_desc, cmd, &info);
|
||||
if (ret) {
|
||||
error("cannot find partition: '%s'", cmd);
|
||||
fastboot_fail(response_str, "cannot find partition");
|
||||
|
||||
@@ -22,8 +22,7 @@ int spl_load_image_ext(struct blk_desc *block_dev,
|
||||
header = (struct image_header *)(CONFIG_SYS_TEXT_BASE -
|
||||
sizeof(struct image_header));
|
||||
|
||||
if (get_partition_info(block_dev,
|
||||
partition, &part_info)) {
|
||||
if (part_get_info(block_dev, partition, &part_info)) {
|
||||
printf("spl: no partition table found\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -71,8 +70,7 @@ int spl_load_image_ext_os(struct blk_desc *block_dev, int partition)
|
||||
disk_partition_t part_info = {};
|
||||
__maybe_unused char *file;
|
||||
|
||||
if (get_partition_info(block_dev,
|
||||
partition, &part_info)) {
|
||||
if (part_get_info(block_dev, partition, &part_info)) {
|
||||
printf("spl: no partition table found\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ static int mmc_load_image_raw_partition(struct mmc *mmc, int partition)
|
||||
disk_partition_t info;
|
||||
int err;
|
||||
|
||||
err = get_partition_info(&mmc->block_dev, partition, &info);
|
||||
err = part_get_info(&mmc->block_dev, partition, &info);
|
||||
if (err) {
|
||||
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
|
||||
puts("spl: partition error\n");
|
||||
|
||||
@@ -1374,7 +1374,7 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *ss,
|
||||
debug(" address %d\n", dev_desc->target);
|
||||
debug("partype: %d\n", dev_desc->part_type);
|
||||
|
||||
init_part(dev_desc);
|
||||
part_init(dev_desc);
|
||||
|
||||
debug("partype: %d\n", dev_desc->part_type);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user