summaryrefslogtreecommitdiff
path: root/cmd/host.c
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2019-08-22 16:47:39 +0900
committerTom Rini <trini@konsulko.com>2019-10-06 15:20:53 -0400
commit5bac9c5307642400abc61a7f9ba76ac06a77fcf8 (patch)
tree3b716926ea489e676ac45d6ea0147d841134eed4 /cmd/host.c
parent9bd9b2bcbee1c0a0c2fcc2d5e2c61ea272e865c5 (diff)
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 <takahiro.akashi@linaro.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'cmd/host.c')
-rw-r--r--cmd/host.c2
1 files changed, 1 insertions, 1 deletions
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