sandbox: pci: Remember the device being emulated
authorSimon Glass <sjg@chromium.org>
Sat, 21 Sep 2019 20:32:41 +0000 (14:32 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Fri, 11 Oct 2019 09:37:15 +0000 (17:37 +0800)
commit6498fda140f526f82f87e057afb61ca23904770f
tree8b23c0194eb4e3b783949ce5c040790c9affe433
parent3d95688c85aa26dea5d98e277d724aff571a1b4e
sandbox: pci: Remember the device being emulated

Add a field to the PCI emulator per-device data which records which device
is being emulated. This is useful when the emulator needs to check the
device for something.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: rebase the patch against u-boot-x86/master to get it applied cleanly]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
drivers/pci/pci-emul-uclass.c
include/pci.h