summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/utils.c')
-rw-r--r--arch/arm/mach-omap2/utils.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c
index 0b0bf1837c9..d4f171b0ee1 100644
--- a/arch/arm/mach-omap2/utils.c
+++ b/arch/arm/mach-omap2/utils.c
@@ -87,15 +87,14 @@ static u32 omap_mmc_get_part_size(const char *part)
dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV);
if (!dev_desc || dev_desc->type == DEV_TYPE_UNKNOWN) {
- error("invalid mmc device\n");
+ pr_err("invalid mmc device\n");
return 0;
}
- res = part_get_info_by_name(dev_desc, part, &info);
- if (res < 0) {
- error("cannot find partition: '%s'\n", part);
+ /* Check only for EFI (GPT) partition table */
+ res = part_get_info_by_name_type(dev_desc, part, &info, PART_TYPE_EFI);
+ if (res < 0)
return 0;
- }
/* Calculate size in bytes */
sz = (info.size * (u64)info.blksz);
@@ -111,13 +110,10 @@ static void omap_set_fastboot_userdata_size(void)
u32 sz_kb;
sz_kb = omap_mmc_get_part_size("userdata");
- if (sz_kb == 0) {
- buf[0] = '\0';
- printf("Warning: fastboot.userdata_size: unable to calc\n");
- } else {
- sprintf(buf, "%u", sz_kb);
- }
+ if (sz_kb == 0)
+ return; /* probably it's not Android partition table */
+ sprintf(buf, "%u", sz_kb);
env_set("fastboot.userdata_size", buf);
}
#else