From af7edb1d326de0af565b48c663163c7e5050e03c Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 2 Dec 2024 12:40:18 +0100 Subject: rust: qdev: make reset take a shared reference Because register reset is within a borrow_mut() call, reset does not need anymore a mut reference to the PL011State. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/hw/char/pl011/src') diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs index bb6a6e4daf..8050ede9c8 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -172,7 +172,7 @@ impl DeviceImpl for PL011State { Some(&device_class::VMSTATE_PL011) } const REALIZE: Option = Some(Self::realize); - const RESET: Option = Some(Self::reset); + const RESET: Option = Some(Self::reset); } impl PL011Registers { @@ -631,7 +631,7 @@ impl PL011State { } } - pub fn reset(&mut self) { + pub fn reset(&self) { self.regs.borrow_mut().reset(); } -- cgit 1.4.1