mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
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
This commit is contained in:
parent
4d789488d3
commit
04b325fb34
|
|
@ -12,10 +12,10 @@
|
|||
use crate::{
|
||||
container_of,
|
||||
drm::{
|
||||
device,
|
||||
driver,
|
||||
gem,
|
||||
private::Sealed, //
|
||||
private::Sealed,
|
||||
Device, //
|
||||
},
|
||||
error::to_result,
|
||||
prelude::*,
|
||||
|
|
@ -106,7 +106,7 @@ fn as_raw_shmem(&self) -> *mut bindings::drm_gem_shmem_object {
|
|||
///
|
||||
/// Additional config options can be specified using `config`.
|
||||
pub fn new(
|
||||
dev: &device::Device<T::Driver>,
|
||||
dev: &Device<T::Driver>,
|
||||
size: usize,
|
||||
config: ObjectConfig<'_, T>,
|
||||
args: T::Args,
|
||||
|
|
@ -148,9 +148,9 @@ pub fn new(
|
|||
}
|
||||
|
||||
/// Returns the `Device` that owns this GEM object.
|
||||
pub fn dev(&self) -> &device::Device<T::Driver> {
|
||||
pub fn dev(&self) -> &Device<T::Driver> {
|
||||
// SAFETY: `dev` will have been initialized in `Self::new()` by `drm_gem_shmem_init()`.
|
||||
unsafe { device::Device::from_raw((*self.as_raw()).dev) }
|
||||
unsafe { Device::from_raw((*self.as_raw()).dev) }
|
||||
}
|
||||
|
||||
extern "C" fn free_callback(obj: *mut bindings::drm_gem_object) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user