diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-11-29 08:48:07 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-01-10 23:34:43 +0100 |
commit | 22a18f0a98a1ca5d0cd8fff1d81cc74a269083de (patch) | |
tree | 7894cc4e3c9cdd39ff879fdf30b84dc3e5ee125c /rust/hw | |
parent | af68b41d403b81b18de07ebab0ca4c1025c94bf7 (diff) | |
download | qemu-22a18f0a98a1ca5d0cd8fff1d81cc74a269083de.zip qemu-22a18f0a98a1ca5d0cd8fff1d81cc74a269083de.tar.gz qemu-22a18f0a98a1ca5d0cd8fff1d81cc74a269083de.tar.bz2 |
rust: qom: make INSTANCE_POST_INIT take a shared reference
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/hw')
-rw-r--r-- | rust/hw/char/pl011/src/device.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs index 72a4cea..6792d13 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -145,7 +145,7 @@ impl ObjectImpl for PL011State { type ParentType = SysBusDevice; const INSTANCE_INIT: Option<unsafe fn(&mut Self)> = Some(Self::init); - const INSTANCE_POST_INIT: Option<fn(&mut Self)> = Some(Self::post_init); + const INSTANCE_POST_INIT: Option<fn(&Self)> = Some(Self::post_init); } impl DeviceImpl for PL011State { @@ -206,7 +206,7 @@ impl PL011State { } } - fn post_init(&mut self) { + fn post_init(&self) { let sbd: &SysBusDevice = self.upcast(); sbd.init_mmio(&self.iomem); |