[PATCH v4 01/20] drm/tyr: remove unused device from platform data
From: Deborah Brouwer
Date: Fri Apr 24 2026 - 19:40:46 EST
TyrPlatformDriverData stores an ARef to the DRM device to keep it alive,
but after switching to Registration::new_foreign_owned(), the registration
owns the device, so the extra reference is no longer needed.
Remove the device field and return an empty TyrPlatformDriverData instead.
Signed-off-by: Deborah Brouwer <deborah.brouwer@xxxxxxxxxxxxx>
---
drivers/gpu/drm/tyr/driver.rs | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/tyr/driver.rs b/drivers/gpu/drm/tyr/driver.rs
index 0a1cfbad1e6c..7a27207e52f7 100644
--- a/drivers/gpu/drm/tyr/driver.rs
+++ b/drivers/gpu/drm/tyr/driver.rs
@@ -52,9 +52,7 @@
pub(crate) type TyrDrmDevice<Ctx = drm::Registered> = drm::Device<TyrDrmDriver, Ctx>;
#[pin_data(PinnedDrop)]
-pub(crate) struct TyrPlatformDriverData {
- _device: ARef<TyrDrmDevice>,
-}
+pub(crate) struct TyrPlatformDriverData;
#[pin_data(PinnedDrop)]
pub(crate) struct TyrDrmDeviceData {
@@ -157,15 +155,12 @@ fn probe(
gpu_info,
});
- let ddev = Registration::new_foreign_owned(uninit_ddev, pdev.as_ref(), data, 0)?;
- let driver = TyrPlatformDriverData {
- _device: ddev.into(),
- };
+ Registration::new_foreign_owned(uninit_ddev, pdev.as_ref(), data, 0)?;
// We need this to be dev_info!() because dev_dbg!() does not work at
// all in Rust for now, and we need to see whether probe succeeded.
dev_info!(pdev, "Tyr initialized correctly.\n");
- Ok(driver)
+ Ok(TyrPlatformDriverData)
}
}
--
2.53.0