From: AKASHI Takahiro Date: Thu, 22 Aug 2019 07:47:39 +0000 (+0900) Subject: cmd: host: fix seg fault at "host info" X-Git-Tag: v2019.10~2^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5bac9c5307642400abc61a7f9ba76ac06a77fcf8;p=oweals%2Fu-boot.git cmd: host: fix seg fault at "host info" With the patch below applied, host_block_dev structure was switched to be placed in platdata rather than priv. The command "host info" must be aligned with this change. Otherwise, we will see "Segmentation Fault." Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data") Signed-off-by: AKASHI Takahiro Reviewed-by: Bin Meng Tested-by: Bin Meng Reviewed-by: Heinrich Schuchardt --- diff --git a/cmd/host.c b/cmd/host.c index f7d3eae5b1..98c4d2a099 100644 --- a/cmd/host.c +++ b/cmd/host.c @@ -89,7 +89,7 @@ static int do_host_info(cmd_tbl_t *cmdtp, int flag, int argc, struct host_block_dev *host_dev; #ifdef CONFIG_BLK - host_dev = dev_get_priv(blk_dev->bdev); + host_dev = dev_get_platdata(blk_dev->bdev); #else host_dev = blk_dev->priv; #endif