diff mbox

[U-Boot] mmc: Fix error in RPMB code

Message ID 1462372525-6171-1-git-send-email-marex@denx.de
State Accepted
Commit b955e42bad81a2ddad2f82c1843771de9bdfe6d4
Delegated to: Tom Rini
Headers show

Commit Message

Marek Vasut May 4, 2016, 2:35 p.m. UTC
Since we do not build any board with CONFIG_SUPPORT_EMMC_RPMB , this
piece of code evaded conversion. Fix the following compiler error:

cmd/mmc.c: In function 'do_mmcrpmb':
cmd/mmc.c:316:32: error: 'struct blk_desc' has no member named 'part_num'
  original_part = mmc->block_dev.part_num;
                                ^

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
---
 cmd/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini May 6, 2016, 5:47 p.m. UTC | #1
On Wed, May 04, 2016 at 04:35:25PM +0200, Marek Vasut wrote:

> Since we do not build any board with CONFIG_SUPPORT_EMMC_RPMB , this
> piece of code evaded conversion. Fix the following compiler error:
> 
> cmd/mmc.c: In function 'do_mmcrpmb':
> cmd/mmc.c:316:32: error: 'struct blk_desc' has no member named 'part_num'
>   original_part = mmc->block_dev.part_num;
>                                 ^
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
> Cc: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/cmd/mmc.c b/cmd/mmc.c
index 39ef072..c5454bf 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -313,7 +313,7 @@  static int do_mmcrpmb(cmd_tbl_t *cmdtp, int flag,
 		return CMD_RET_FAILURE;
 	}
 	/* Switch to the RPMB partition */
-	original_part = mmc->block_dev.part_num;
+	original_part = mmc->block_dev.hwpart;
 	if (mmc_select_hwpart(curr_device, MMC_PART_RPMB) != 0)
 		return CMD_RET_FAILURE;
 	ret = cp->cmd(cmdtp, flag, argc, argv);