diff --git a/rust/kernel/drm/ioctl.rs b/rust/kernel/drm/ioctl.rs index ccf4150d83b6..6f5a9877bdae 100644 --- a/rust/kernel/drm/ioctl.rs +++ b/rust/kernel/drm/ioctl.rs @@ -134,7 +134,8 @@ macro_rules! declare_drm_ioctls { // FIXME: Currently there is nothing enforcing that the types of the // dev/file match the current driver these ioctls are being declared // for, and it's not clear how to enforce this within the type system. - let dev = $crate::drm::device::Device::from_raw(raw_dev); + let dev: &$crate::drm::device::Device<_, $crate::drm::Normal> = + $crate::drm::device::Device::from_raw(raw_dev); // Enforce that the handler accepts higher-ranked // lifetimes, preventing it from requiring 'static