Skip to content
Snippets Groups Projects
Verified Commit 0cc6aadd authored by Luca Ceresoli's avatar Luca Ceresoli Committed by Louis Chauvet
Browse files

drm/bridge: add devm_drm_bridge_alloc()


Add a macro to allocate and initialize a DRM bridge embedded within a
private driver struct.

Compared to current practice, which is based on [devm_]kzalloc() allocation
followed by open-coded initialization of fields, this allows to have a
common and explicit API to allocate and initialize DRM bridges.

Besides being useful to consolidate bridge driver code, this is a
fundamental step in preparation for adding dynamic lifetime to bridges
based on refcount.

Reviewed-by: Maxime Ripard's avatarMaxime Ripard <mripard@kernel.org>
Signed-off-by: default avatarLuca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250326-drm-bridge-refcount-v9-1-5e0661fe1f84@bootlin.com


Signed-off-by: default avatarLouis Chauvet <louis.chauvet@bootlin.com>
parent 81feddc1
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment