]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/tilcdc: Remove the use of drm_device private_data
authorKory Maincent (TI.com) <kory.maincent@bootlin.com>
Fri, 23 Jan 2026 16:12:35 +0000 (17:12 +0100)
committerLuca Ceresoli <luca.ceresoli@bootlin.com>
Wed, 11 Feb 2026 08:16:15 +0000 (09:16 +0100)
commit968fefee98d80bedbf1765e48201746880bf7277
tree85db00979ab649dd4e42e977c5bc4da8b1cf6727
parent3301302060da8c2034e5e10dc231023ec98051fb
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>
drivers/gpu/drm/tilcdc/tilcdc_crtc.c
drivers/gpu/drm/tilcdc/tilcdc_drv.c
drivers/gpu/drm/tilcdc/tilcdc_drv.h
drivers/gpu/drm/tilcdc/tilcdc_encoder.c
drivers/gpu/drm/tilcdc/tilcdc_plane.c
drivers/gpu/drm/tilcdc/tilcdc_regs.h