hw/gpio: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-29-richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2023-12-21 14:16:09 +11:00
parent 63e6b56450
commit 3b9e779b86
11 changed files with 12 additions and 12 deletions

View file

@ -1067,7 +1067,7 @@ static const VMStateDescription vmstate_gpio_regs = {
.name = TYPE_ASPEED_GPIO"/regs",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(data_value, GPIOSets),
VMSTATE_UINT32(data_read, GPIOSets),
VMSTATE_UINT32(direction, GPIOSets),
@ -1090,7 +1090,7 @@ static const VMStateDescription vmstate_aspeed_gpio = {
.name = TYPE_ASPEED_GPIO,
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_STRUCT_ARRAY(sets, AspeedGPIOState, ASPEED_GPIO_MAX_NR_SETS,
1, vmstate_gpio_regs, GPIOSets),
VMSTATE_UINT32_ARRAY(debounce_regs, AspeedGPIOState,

View file

@ -284,7 +284,7 @@ static const VMStateDescription vmstate_bcm2835_gpio = {
.name = "bcm2835_gpio",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT8_ARRAY(fsel, BCM2835GpioState, 54),
VMSTATE_UINT32(lev0, BCM2835GpioState),
VMSTATE_UINT32(lev1, BCM2835GpioState),

View file

@ -45,7 +45,7 @@ static const VMStateDescription vmstate_gpio_key = {
.name = "gpio-key",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_TIMER_PTR(timer, GPIOKEYState),
VMSTATE_END_OF_LIST()
}

View file

@ -277,7 +277,7 @@ static const VMStateDescription vmstate_imx_gpio = {
.name = TYPE_IMX_GPIO,
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(dr, IMXGPIOState),
VMSTATE_UINT32(gdir, IMXGPIOState),
VMSTATE_UINT32(psr, IMXGPIOState),

View file

@ -155,7 +155,7 @@ static const VMStateDescription vmstate_max7310 = {
.name = "max7310",
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_INT32(i2c_command_byte, MAX7310State),
VMSTATE_INT32(len, MAX7310State),
VMSTATE_UINT8(level, MAX7310State),

View file

@ -48,7 +48,7 @@ static const VMStateDescription vmstate_mpc8xxx_gpio = {
.name = "mpc8xxx_gpio",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(dir, MPC8XXXGPIOState),
VMSTATE_UINT32(odr, MPC8XXXGPIOState),
VMSTATE_UINT32(dat, MPC8XXXGPIOState),

View file

@ -377,7 +377,7 @@ static const VMStateDescription vmstate_npcm7xx_gpio = {
.name = "npcm7xx-gpio",
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(pin_level, NPCM7xxGPIOState),
VMSTATE_UINT32(ext_level, NPCM7xxGPIOState),
VMSTATE_UINT32(ext_driven, NPCM7xxGPIOState),

View file

@ -280,7 +280,7 @@ static const VMStateDescription vmstate_nrf51_gpio = {
.name = TYPE_NRF51_GPIO,
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(out, NRF51GPIOState),
VMSTATE_UINT32(in, NRF51GPIOState),
VMSTATE_UINT32(in_mask, NRF51GPIOState),

View file

@ -87,7 +87,7 @@ static const VMStateDescription vmstate_pl061 = {
.name = "pl061",
.version_id = 4,
.minimum_version_id = 4,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(locked, PL061State),
VMSTATE_UINT32(data, PL061State),
VMSTATE_UINT32(old_out_data, PL061State),

View file

@ -326,7 +326,7 @@ static const VMStateDescription vmstate_sifive_gpio = {
.name = TYPE_SIFIVE_GPIO,
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(value, SIFIVEGPIOState),
VMSTATE_UINT32(input_en, SIFIVEGPIOState),
VMSTATE_UINT32(output_en, SIFIVEGPIOState),

View file

@ -222,7 +222,7 @@ static const VMStateDescription vmstate_scoop_regs = {
.version_id = 1,
.minimum_version_id = 0,
.post_load = scoop_post_load,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT16(status, ScoopInfo),
VMSTATE_UINT16(power, ScoopInfo),
VMSTATE_UINT32(gpio_level, ScoopInfo),