mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
gpu: nova-core: replace ARef<Device> with &'bound Device in SysmemFlush
Now that SysmemFlush is lifetime-parameterized, the ARef<Device> is unnecessary -- a plain &'bound Device reference suffices. Reviewed-by: Eliot Courtney <ecourtney@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://patch.msgid.link/20260525225838.276108-4-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
parent
d8143c9e98
commit
17b6544ec1
|
|
@ -15,8 +15,7 @@
|
|||
Alignable,
|
||||
Alignment, //
|
||||
},
|
||||
sizes::*,
|
||||
sync::aref::ARef, //
|
||||
sizes::*, //
|
||||
};
|
||||
|
||||
use crate::{
|
||||
|
|
@ -46,7 +45,7 @@
|
|||
pub(crate) struct SysmemFlush<'sys> {
|
||||
/// Chipset we are operating on.
|
||||
chipset: Chipset,
|
||||
device: ARef<device::Device>,
|
||||
device: &'sys device::Device,
|
||||
bar: &'sys Bar0,
|
||||
/// Keep the page alive as long as we need it.
|
||||
page: CoherentHandle,
|
||||
|
|
@ -55,7 +54,7 @@ pub(crate) struct SysmemFlush<'sys> {
|
|||
impl<'sys> SysmemFlush<'sys> {
|
||||
/// Allocate a memory page and register it as the sysmem flush page.
|
||||
pub(crate) fn register(
|
||||
dev: &device::Device<device::Bound>,
|
||||
dev: &'sys device::Device<device::Bound>,
|
||||
bar: &'sys Bar0,
|
||||
chipset: Chipset,
|
||||
) -> Result<Self> {
|
||||
|
|
@ -65,7 +64,7 @@ pub(crate) fn register(
|
|||
|
||||
Ok(Self {
|
||||
chipset,
|
||||
device: dev.into(),
|
||||
device: dev,
|
||||
bar,
|
||||
page,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user