mirror of https://gitee.com/openkylin/qemu.git
hw/display: Use memory_region_init_rom() with read-only regions
This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
16260006ac
commit
52013bcea0
|
@ -287,9 +287,8 @@ static void cg3_initfn(Object *obj)
|
|||
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
|
||||
CG3State *s = CG3(obj);
|
||||
|
||||
memory_region_init_ram_nomigrate(&s->rom, obj, "cg3.prom", FCODE_MAX_ROM_SIZE,
|
||||
&error_fatal);
|
||||
memory_region_set_readonly(&s->rom, true);
|
||||
memory_region_init_rom_nomigrate(&s->rom, obj, "cg3.prom",
|
||||
FCODE_MAX_ROM_SIZE, &error_fatal);
|
||||
sysbus_init_mmio(sbd, &s->rom);
|
||||
|
||||
memory_region_init_io(&s->reg, obj, &cg3_reg_ops, s, "cg3.reg",
|
||||
|
|
|
@ -755,9 +755,8 @@ static void tcx_initfn(Object *obj)
|
|||
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
|
||||
TCXState *s = TCX(obj);
|
||||
|
||||
memory_region_init_ram_nomigrate(&s->rom, obj, "tcx.prom", FCODE_MAX_ROM_SIZE,
|
||||
&error_fatal);
|
||||
memory_region_set_readonly(&s->rom, true);
|
||||
memory_region_init_rom_nomigrate(&s->rom, obj, "tcx.prom",
|
||||
FCODE_MAX_ROM_SIZE, &error_fatal);
|
||||
sysbus_init_mmio(sbd, &s->rom);
|
||||
|
||||
/* 2/STIP : Stippler */
|
||||
|
|
Loading…
Reference in New Issue