diff options
Diffstat (limited to 'rust/hw')
| -rw-r--r-- | rust/hw/char/pl011/src/device.rs | 4 | ||||
| -rw-r--r-- | rust/hw/timer/hpet/src/device.rs | 9 |
2 files changed, 3 insertions, 10 deletions
diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs index 87a17716fe..8411db8d00 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -172,9 +172,7 @@ impl ObjectImpl for PL011State { } impl DeviceImpl for PL011State { - fn vmsd() -> Option<VMStateDescription<Self>> { - Some(VMSTATE_PL011) - } + const VMSTATE: Option<VMStateDescription<Self>> = Some(VMSTATE_PL011); const REALIZE: Option<fn(&Self) -> qemu_api::Result<()>> = Some(Self::realize); } diff --git a/rust/hw/timer/hpet/src/device.rs b/rust/hw/timer/hpet/src/device.rs index eb5bd042b1..dd5326a40d 100644 --- a/rust/hw/timer/hpet/src/device.rs +++ b/rust/hw/timer/hpet/src/device.rs @@ -1008,16 +1008,11 @@ const VMSTATE_HPET: VMStateDescription<HPETState> = // SAFETY: HPET_PROPERTIES is a valid Property array constructed with the // qemu_api::declare_properties macro. unsafe impl qemu_api::qdev::DevicePropertiesImpl for HPETState { - fn properties() -> &'static [Property] { - &HPET_PROPERTIES - } + const PROPERTIES: &'static [Property] = &HPET_PROPERTIES; } impl DeviceImpl for HPETState { - fn vmsd() -> Option<VMStateDescription<Self>> { - Some(VMSTATE_HPET) - } - + const VMSTATE: Option<VMStateDescription<Self>> = Some(VMSTATE_HPET); const REALIZE: Option<fn(&Self) -> qemu_api::Result<()>> = Some(Self::realize); } |