diff options
Diffstat (limited to 'rust/kernel/drm/device.rs')
-rw-r--r-- | rust/kernel/drm/device.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rust/kernel/drm/device.rs b/rust/kernel/drm/device.rs index c90ce2d71095..8dc1ac7dc2a3 100644 --- a/rust/kernel/drm/device.rs +++ b/rust/kernel/drm/device.rs @@ -83,9 +83,11 @@ impl<T: drm::drv::Driver> Device<T> { driver_features: T::FEATURES, ioctls: T::IOCTLS.as_ptr(), num_ioctls: T::IOCTLS.len() as i32, - fops: core::ptr::null_mut() as _, + fops: &Self::GEM_FOPS as _, }; + const GEM_FOPS: bindings::file_operations = drm::gem::create_fops(); + /// Create a new `drm::device::Device` for a `drm::drv::Driver`. pub fn new(dev: &device::Device, data: T::Data) -> Result<ARef<Self>> { // SAFETY: `dev` is valid by its type invarants; `VTABLE`, as a `const` is pinned to the |