diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-13 12:37:43 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-25 16:18:12 +0100 |
commit | d556226d6965738e06a1d75faaf271b769bb5880 (patch) | |
tree | e242a3f8d66528eda3ceaa54ba5f91df76ef7d77 /rust/hw/char/pl011/src/device.rs | |
parent | 567c0c41a6700be72eb9e040ba0b8d7bf0cc5919 (diff) | |
download | qemu-d556226d6965738e06a1d75faaf271b769bb5880.zip qemu-d556226d6965738e06a1d75faaf271b769bb5880.tar.gz qemu-d556226d6965738e06a1d75faaf271b769bb5880.tar.bz2 |
rust: qom: get rid of ClassInitImpl
Complete the conversion from the ClassInitImpl trait to class_init() methods.
This will provide more freedom to split the qemu_api crate in separate parts.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/hw/char/pl011/src/device.rs')
-rw-r--r-- | rust/hw/char/pl011/src/device.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs index 094049c..d0857b4 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -19,8 +19,8 @@ use qemu_api::{ memory::{hwaddr, MemoryRegion, MemoryRegionOps, MemoryRegionOpsBuilder}, prelude::*, qdev::{Clock, ClockEvent, DeviceImpl, DeviceState, Property, ResetType, ResettablePhasesImpl}, - qom::{ClassInitImpl, ObjectImpl, Owned, ParentField}, - sysbus::{SysBusDevice, SysBusDeviceClass, SysBusDeviceImpl}, + qom::{ObjectImpl, Owned, ParentField}, + sysbus::{SysBusDevice, SysBusDeviceImpl}, vmstate::VMStateDescription, }; @@ -145,7 +145,7 @@ trait PL011Impl: SysBusDeviceImpl + IsA<PL011State> { impl PL011Class { fn class_init<T: PL011Impl>(&mut self) { self.device_id = T::DEVICE_ID; - <T as ClassInitImpl<SysBusDeviceClass>>::class_init(&mut self.parent_class); + self.parent_class.class_init::<T>(); } } |