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/drv.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rust/kernel/drm/drv.rs') diff --git a/rust/kernel/drm/drv.rs b/rust/kernel/drm/drv.rs index ebb79a8c90ee..895409f04664 100644 --- a/rust/kernel/drm/drv.rs +++ b/rust/kernel/drm/drv.rs @@ -139,6 +139,9 @@ pub trait Driver { /// Should be either `drm::gem::Object` or `drm::gem::shmem::Object`. type Object: AllocImpl; + /// The type used to represent a DRM File (client) + type File: drm::file::DriverFile; + /// Driver metadata const INFO: DriverInfo; -- cgit v1.2.3-58-ga151