From: Kever Yang Date: Thu, 8 Jun 2017 01:20:03 +0000 (+0800) Subject: mmc: use new hwpart API when CONFIG_BLK enabled X-Git-Tag: v2017.09-rc1~188 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4dc80c8732f0fe971669a8440abd78c42bd1367c;p=u-boot mmc: use new hwpart API when CONFIG_BLK enabled When CONFIG_BLK is enabled, the hwpart id is different with legacy interface, update it to kame driver work with CONFIG_BLK. Signed-off-by: Kever Yang Reviewed-by: Simon Glass Signed-off-by: Jaehoon Chung --- diff --git a/cmd/mmc.c b/cmd/mmc.c index f83032ec45..f7b75684ad 100644 --- a/cmd/mmc.c +++ b/cmd/mmc.c @@ -253,7 +253,11 @@ static int do_mmcrpmb(cmd_tbl_t *cmdtp, int flag, return CMD_RET_FAILURE; } /* Switch to the RPMB partition */ +#ifndef CONFIG_BLK original_part = mmc->block_dev.hwpart; +#else + original_part = mmc_get_blk_desc(mmc)->hwpart; +#endif if (blk_select_hwpart_devnum(IF_TYPE_MMC, curr_device, MMC_PART_RPMB) != 0) return CMD_RET_FAILURE;