diff options
| author | Kory Maincent (TI.com) <kory.maincent@bootlin.com> | 2026-01-23 17:12:35 +0100 |
|---|---|---|
| committer | Luca Ceresoli <luca.ceresoli@bootlin.com> | 2026-02-11 09:16:15 +0100 |
| commit | 968fefee98d80bedbf1765e48201746880bf7277 (patch) | |
| tree | 85db00979ab649dd4e42e977c5bc4da8b1cf6727 /drivers/gpu/drm/tilcdc/tilcdc_plane.c | |
| parent | 3301302060da8c2034e5e10dc231023ec98051fb (diff) | |
| download | linux-next-968fefee98d80bedbf1765e48201746880bf7277.tar.gz linux-next-968fefee98d80bedbf1765e48201746880bf7277.zip | |
drm/tilcdc: Remove the use of drm_device private_data
The DRM core documentation recommends against using dev_private:
"Instead of using this pointer it is recommended that drivers use
embed the struct &drm_device in their larger per-device structure."
This patch refactors the tilcdc driver to follow this recommendation
by embedding struct drm_device within struct tilcdc_drm_private and
replacing all dev->dev_private accesses with the ddev_to_tilcdc_priv()
helper macro that uses container_of().
This change aligns the driver with modern DRM best practices.
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Link: https://patch.msgid.link/20260123-feature_tilcdc-v5-17-5a44d2aa3f6f@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Diffstat (limited to 'drivers/gpu/drm/tilcdc/tilcdc_plane.c')
| -rw-r--r-- | drivers/gpu/drm/tilcdc/tilcdc_plane.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_plane.c b/drivers/gpu/drm/tilcdc/tilcdc_plane.c index aa72ca679598..a77a5b22ebd9 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_plane.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_plane.c @@ -101,7 +101,7 @@ static const struct drm_plane_helper_funcs plane_helper_funcs = { int tilcdc_plane_init(struct drm_device *dev, struct drm_plane *plane) { - struct tilcdc_drm_private *priv = dev->dev_private; + struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev); int ret; ret = drm_universal_plane_init(dev, plane, 1, &tilcdc_plane_funcs, |
