Skip to content

Commit 04b325f

Browse files
committed
rust: drm: gem: s/device::Device/Device/ for shmem.rs
We're about to start explicitly mentioning kernel devices as well in this file, so this makes it easier to differentiate the two by allowing us to import `device` as `kernel::device`. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20260428190605.3355690-2-lyude@redhat.com
1 parent 4d78948 commit 04b325f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

rust/kernel/drm/gem/shmem.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
use crate::{
1313
container_of,
1414
drm::{
15-
device,
1615
driver,
1716
gem,
18-
private::Sealed, //
17+
private::Sealed,
18+
Device, //
1919
},
2020
error::to_result,
2121
prelude::*,
@@ -106,7 +106,7 @@ impl<T: DriverObject> Object<T> {
106106
///
107107
/// Additional config options can be specified using `config`.
108108
pub fn new(
109-
dev: &device::Device<T::Driver>,
109+
dev: &Device<T::Driver>,
110110
size: usize,
111111
config: ObjectConfig<'_, T>,
112112
args: T::Args,
@@ -148,9 +148,9 @@ impl<T: DriverObject> Object<T> {
148148
}
149149

150150
/// Returns the `Device` that owns this GEM object.
151-
pub fn dev(&self) -> &device::Device<T::Driver> {
151+
pub fn dev(&self) -> &Device<T::Driver> {
152152
// SAFETY: `dev` will have been initialized in `Self::new()` by `drm_gem_shmem_init()`.
153-
unsafe { device::Device::from_raw((*self.as_raw()).dev) }
153+
unsafe { Device::from_raw((*self.as_raw()).dev) }
154154
}
155155

156156
extern "C" fn free_callback(obj: *mut bindings::drm_gem_object) {

0 commit comments

Comments
 (0)