mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-24 04:34:22 +08:00
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: 8f994c860d
("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>
This commit is contained in:
parent
9bd9b2bcbe
commit
5bac9c5307
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user