mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
af68b41d40
commit
22a18f0a98
2 changed files with 4 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue