hw/arm/msf2_soc: Don't allocate separate MemoryRegions

In the realize method of the msf2-soc SoC object, we call g_new() to
create new MemoryRegion objects for the nvm, nvm_alias, and sram.
This is unnecessary; make these MemoryRegions member fields of the
device state struct instead.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alexandre Iooss <erdnaxe@crans.org>
Message-id: 20210812093356.1946-19-peter.maydell@linaro.org
This commit is contained in:
Peter Maydell 2021-08-12 10:33:49 +01:00
parent 8ecda75f72
commit a4b1e9d3f8
2 changed files with 11 additions and 10 deletions

View file

@ -65,6 +65,10 @@ struct MSF2State {
MSSTimerState timer;
MSSSpiState spi[MSF2_NUM_SPIS];
MSF2EmacState emac;
MemoryRegion nvm;
MemoryRegion nvm_alias;
MemoryRegion sram;
};
#endif