pci: vfio: Make get_irq_info() return a non-reference

Returning a reference is not possible for the vfio-user code as it is
constructed for the function.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-07-09 14:13:30 +00:00 committed by Sebastien Boeuf
parent 1997152ee1
commit 51ceae9131

View File

@ -301,7 +301,7 @@ pub(crate) trait Vfio {
unimplemented!()
}
fn get_irq_info(&self, _irq_index: u32) -> Option<&VfioIrq> {
fn get_irq_info(&self, _irq_index: u32) -> Option<VfioIrq> {
unimplemented!()
}
@ -341,8 +341,8 @@ impl Vfio for VfioDeviceWrapper {
self.device.region_write(index, data, offset)
}
fn get_irq_info(&self, irq_index: u32) -> Option<&VfioIrq> {
self.device.get_irq_info(irq_index)
fn get_irq_info(&self, irq_index: u32) -> Option<VfioIrq> {
self.device.get_irq_info(irq_index).copied()
}
fn enable_irq(