Thread (41 messages) 41 messages, 4 authors, 2026-01-23

Re: [PATCH v4 16/25] drm/tilcdc: Modernize driver initialization and cleanup paths

From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
Date: 2026-01-19 16:18:38
Also in: dri-devel, linux-arm-kernel, linux-omap, lkml

On Fri Jan 16, 2026 at 6:02 PM CET, Kory Maincent (TI.com) wrote:
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.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help