diff --git a/drivers/gpu/drm/tyr/driver.rs b/drivers/gpu/drm/tyr/driver.rs index 98732afc096f..6276e9743c32 100644 --- a/drivers/gpu/drm/tyr/driver.rs +++ b/drivers/gpu/drm/tyr/driver.rs @@ -51,6 +51,8 @@ /// Convenience type alias for the DRM device type for this driver. pub(crate) type TyrDrmDevice = drm::Device; +pub(crate) struct TyrPlatformDriver; + #[pin_data(PinnedDrop)] pub(crate) struct TyrPlatformDriverData { _device: ARef, @@ -93,22 +95,22 @@ fn issue_soft_reset(dev: &Device, iomem: &Devres) -> Result { kernel::of_device_table!( OF_TABLE, MODULE_OF_TABLE, - ::IdInfo, + ::IdInfo, [ (of::DeviceId::new(c"rockchip,rk3588-mali"), ()), (of::DeviceId::new(c"arm,mali-valhall-csf"), ()) ] ); -impl platform::Driver for TyrPlatformDriverData { +impl platform::Driver for TyrPlatformDriver { type IdInfo = (); - type Data<'bound> = Self; + type Data<'bound> = TyrPlatformDriverData; const OF_ID_TABLE: Option> = Some(&OF_TABLE); fn probe<'bound>( pdev: &'bound platform::Device>, _info: Option<&'bound Self::IdInfo>, - ) -> impl PinInit + 'bound { + ) -> impl PinInit, Error> + 'bound { let core_clk = Clk::get(pdev.as_ref(), Some(c"core"))?; let stacks_clk = OptionalClk::get(pdev.as_ref(), Some(c"stacks"))?; let coregroup_clk = OptionalClk::get(pdev.as_ref(), Some(c"coregroup"))?; diff --git a/drivers/gpu/drm/tyr/tyr.rs b/drivers/gpu/drm/tyr/tyr.rs index 9432ddd6b5b8..95cda7b0962f 100644 --- a/drivers/gpu/drm/tyr/tyr.rs +++ b/drivers/gpu/drm/tyr/tyr.rs @@ -5,7 +5,7 @@ //! The name "Tyr" is inspired by Norse mythology, reflecting Arm's tradition of //! naming their GPUs after Nordic mythological figures and places. -use crate::driver::TyrPlatformDriverData; +use crate::driver::TyrPlatformDriver; mod driver; mod file; @@ -14,7 +14,7 @@ mod regs; kernel::module_platform_driver! { - type: TyrPlatformDriverData, + type: TyrPlatformDriver, name: "tyr", authors: ["The Tyr driver authors"], description: "Arm Mali Tyr DRM driver",