hw/i2c: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-31-richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2023-12-21 14:16:11 +11:00
parent 2ebfd1c4ac
commit 01d9442a88
13 changed files with 15 additions and 15 deletions

View File

@ -415,7 +415,7 @@ static const VMStateDescription allwinner_i2c_vmstate = {
.name = TYPE_AW_I2C,
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT8(addr, AWI2CState),
VMSTATE_UINT8(xaddr, AWI2CState),
VMSTATE_UINT8(data, AWI2CState),

View File

@ -945,7 +945,7 @@ static const VMStateDescription aspeed_i2c_bus_vmstate = {
.name = TYPE_ASPEED_I2C,
.version_id = 5,
.minimum_version_id = 5,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32_ARRAY(regs, AspeedI2CBus, ASPEED_I2C_NEW_NUM_REG),
VMSTATE_END_OF_LIST()
}
@ -955,7 +955,7 @@ static const VMStateDescription aspeed_i2c_vmstate = {
.name = TYPE_ASPEED_I2C,
.version_id = 2,
.minimum_version_id = 2,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(intr_status, AspeedI2CState),
VMSTATE_STRUCT_ARRAY(busses, AspeedI2CState,
ASPEED_I2C_NR_BUSSES, 1, aspeed_i2c_bus_vmstate,

View File

@ -50,7 +50,7 @@ static const VMStateDescription vmstate_i2c_bus = {
.version_id = 1,
.minimum_version_id = 1,
.pre_save = i2c_bus_pre_save,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT8(saved_address, I2CBus),
VMSTATE_END_OF_LIST()
}
@ -359,7 +359,7 @@ const VMStateDescription vmstate_i2c_slave = {
.version_id = 1,
.minimum_version_id = 1,
.post_load = i2c_slave_post_load,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT8(address, I2CSlave),
VMSTATE_END_OF_LIST()
}

View File

@ -273,7 +273,7 @@ static const VMStateDescription exynos4210_i2c_vmstate = {
.name = "exynos4210.i2c",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT8(i2ccon, Exynos4210I2CState),
VMSTATE_UINT8(i2cstat, Exynos4210I2CState),
VMSTATE_UINT8(i2cds, Exynos4210I2CState),

View File

@ -285,7 +285,7 @@ static const VMStateDescription imx_i2c_vmstate = {
.name = TYPE_IMX_I2C,
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT16(address, IMXI2CState),
VMSTATE_UINT16(iadr, IMXI2CState),
VMSTATE_UINT16(ifdr, IMXI2CState),

View File

@ -80,7 +80,7 @@ static const VMStateDescription microbit_i2c_vmstate = {
.name = TYPE_MICROBIT_I2C,
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32_ARRAY(regs, MicrobitI2CState, MICROBIT_I2C_NREGS),
VMSTATE_UINT32(read_idx, MicrobitI2CState),
VMSTATE_END_OF_LIST()

View File

@ -312,7 +312,7 @@ static const VMStateDescription mpc_i2c_vmstate = {
.name = TYPE_MPC_I2C,
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT8(address, MPCI2CState),
VMSTATE_UINT8(adr, MPCI2CState),
VMSTATE_UINT8(fdr, MPCI2CState),

View File

@ -1046,7 +1046,7 @@ static const VMStateDescription vmstate_npcm7xx_smbus = {
.name = "npcm7xx-smbus",
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT8(sda, NPCM7xxSMBusState),
VMSTATE_UINT8(st, NPCM7xxSMBusState),
VMSTATE_UINT8(cst, NPCM7xxSMBusState),

View File

@ -455,7 +455,7 @@ const VMStateDescription pmsmb_vmstate = {
.name = "pmsmb",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT8(smb_stat, PMSMBus),
VMSTATE_UINT8(smb_ctl, PMSMBus),
VMSTATE_UINT8(smb_cmd, PMSMBus),

View File

@ -1886,7 +1886,7 @@ const VMStateDescription vmstate_pmbus_device = {
.name = TYPE_PMBUS_DEVICE,
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_SMBUS_DEVICE(smb, PMBusDevice),
VMSTATE_UINT8(num_pages, PMBusDevice),
VMSTATE_UINT8(code, PMBusDevice),

View File

@ -100,7 +100,7 @@ static const VMStateDescription vmstate_smbus_eeprom = {
.version_id = 1,
.minimum_version_id = 1,
.needed = smbus_eeprom_vmstate_needed,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_SMBUS_DEVICE(smbusdev, SMBusEEPROMDevice),
VMSTATE_UINT8_ARRAY(data, SMBusEEPROMDevice, SMBUS_EEPROM_SIZE),
VMSTATE_UINT8(offset, SMBusEEPROMDevice),

View File

@ -50,7 +50,7 @@ static const VMStateDescription vmstate_ich9_smbus = {
.name = "ich9_smb",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_PCI_DEVICE(dev, ICH9SMBState),
VMSTATE_BOOL_TEST(irq_enabled, ICH9SMBState, ich9_vmstate_need_smbus),
VMSTATE_STRUCT_TEST(smb, ICH9SMBState, ich9_vmstate_need_smbus, 1,

View File

@ -215,7 +215,7 @@ const VMStateDescription vmstate_smbus_device = {
.name = TYPE_SMBUS_DEVICE,
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_I2C_SLAVE(i2c, SMBusDevice),
VMSTATE_INT32(mode, SMBusDevice),
VMSTATE_INT32(data_len, SMBusDevice),