Skip to content

Commit e11532b

Browse files
lucaceresoliFomys
authored andcommitted
drm/msm/hdmi: convert to devm_drm_bridge_alloc() API
This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Luca Ceresoli <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-18-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <[email protected]>
1 parent fffc884 commit e11532b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

drivers/gpu/drm/msm/hdmi/hdmi_bridge.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -498,16 +498,15 @@ int msm_hdmi_bridge_init(struct hdmi *hdmi)
498498
struct hdmi_bridge *hdmi_bridge;
499499
int ret;
500500

501-
hdmi_bridge = devm_kzalloc(hdmi->dev->dev,
502-
sizeof(*hdmi_bridge), GFP_KERNEL);
503-
if (!hdmi_bridge)
504-
return -ENOMEM;
501+
hdmi_bridge = devm_drm_bridge_alloc(hdmi->dev->dev, struct hdmi_bridge, base,
502+
&msm_hdmi_bridge_funcs);
503+
if (IS_ERR(hdmi_bridge))
504+
return PTR_ERR(hdmi_bridge);
505505

506506
hdmi_bridge->hdmi = hdmi;
507507
INIT_WORK(&hdmi_bridge->hpd_work, msm_hdmi_hotplug_work);
508508

509509
bridge = &hdmi_bridge->base;
510-
bridge->funcs = &msm_hdmi_bridge_funcs;
511510
bridge->ddc = hdmi->i2c;
512511
bridge->type = DRM_MODE_CONNECTOR_HDMIA;
513512
bridge->vendor = "Qualcomm";

0 commit comments

Comments
 (0)