]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/tilcdc: Modernize driver initialization and cleanup paths
authorKory Maincent (TI.com) <kory.maincent@bootlin.com>
Fri, 23 Jan 2026 16:12:34 +0000 (17:12 +0100)
committerLuca Ceresoli <luca.ceresoli@bootlin.com>
Wed, 11 Feb 2026 08:16:15 +0000 (09:16 +0100)
commit3301302060da8c2034e5e10dc231023ec98051fb
tree162322c093ab9358d989e81d4cee3423d728b5f9
parente41591e7474920187be7af0404ec9ed63b5f4614
drm/tilcdc: Modernize driver initialization and cleanup paths

Refactor the driver initialization to use modern DRM managed resource
APIs, simplifying the code.

The tilcdc_init and tilcdc_fini wrapper functions are removed since they
served no purpose after the component framework was eliminated. Their
logic is integrated directly into probe and remove.

Key changes:
- Use devm_drm_dev_alloc() instead of drm_dev_alloc().
- Use drmm_mode_config_init() instead of drm_mode_config_init().
- Align the remove path with the probe error path to ensure consistent
  cleanup ordering in both success and failure cases.
- Adjust platform_set_drvdata() to store the private structure instead
  of the drm_device, matching the new allocation pattern.

These changes reduce error-prone code while maintaining the same
functional behavior.

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-16-5a44d2aa3f6f@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
drivers/gpu/drm/tilcdc/tilcdc_drv.c
drivers/gpu/drm/tilcdc/tilcdc_drv.h