From 57e9abb1112d7008cfd13b25f8105b3e8ff78ac3 Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Sun, 5 Feb 2023 20:58:29 +0900 Subject: rust: drm: file: Add File abstraction A DRM File is the DRM counterpart to a kernel file structure, representing an open DRM file descriptor. Add a Rust abstraction to allow drivers to implement their own File types that implement the DriverFile trait. Signed-off-by: Asahi Lina Signed-off-by: Danilo Krummrich --- rust/kernel/drm/device.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/kernel/drm/device.rs') diff --git a/rust/kernel/drm/device.rs b/rust/kernel/drm/device.rs index 7651246d38dc..c90ce2d71095 100644 --- a/rust/kernel/drm/device.rs +++ b/rust/kernel/drm/device.rs @@ -57,8 +57,8 @@ pub struct Device(Opaque, PhantomData impl Device { const VTABLE: bindings::drm_driver = drm_legacy_fields! { load: None, - open: None, // TODO: File abstraction - postclose: None, // TODO: File abstraction + open: Some(drm::file::open_callback::), + postclose: Some(drm::file::postclose_callback::), unload: None, release: Some(Self::release), master_set: None, -- cgit v1.2.3-58-ga151