TYPE_PFLASH_CFI01 is a TYPE_SYS_BUS_DEVICE which registers its romd MemoryRegion with sysbus_init_mmio(), so we can use the generic sysbus_mmio_get_region() to get the region, no need for a specific pflash_cfi01_get_memory() helper.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- hw/i386/pc_sysfw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index 9fe72b370e8..caad9cbd5eb 100644 --- a/hw/i386/pc_sysfw.c +++ b/hw/i386/pc_sysfw.c @@ -297,7 +297,7 @@ static void pc_system_flash_map(PCMachineState *pcms, 0x100000000ULL - total_size); if (i == 0) { - flash_mem = pflash_cfi01_get_memory(system_flash); + flash_mem = sysbus_mmio_get_region(SYS_BUS_DEVICE(system_flash), 0); pc_isa_bios_init(rom_memory, flash_mem, size); /* Encrypt the pflash boot ROM */ -- 2.26.2
