aboutsummaryrefslogtreecommitdiff
path: root/hw/display/tcx.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2020-02-24 19:50:29 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-03-17 15:18:46 +0100
commit52013bcea02530bb18691356489dd2612f0eab8f (patch)
tree4e266d817b0a69a33f9e302b40fbc9210da9ab33 /hw/display/tcx.c
parent16260006acf8f3aee589b3fd26a1bbbf7b78ae4b (diff)
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>
Diffstat (limited to 'hw/display/tcx.c')
-rw-r--r--hw/display/tcx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index ca458f94fe..76de16e8ea 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -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 */