Skip to content

Commit ed6987b

Browse files
lucaceresoliFomys
authored andcommitted
drm/bridge: dw-hdmi: convert to devm_drm_bridge_alloc() API
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-11-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
1 parent 6287ffd commit ed6987b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/gpu/drm/bridge/synopsys/dw-hdmi.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3333,9 +3333,9 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
33333333
u8 config0;
33343334
u8 config3;
33353335

3336-
hdmi = devm_kzalloc(dev, sizeof(*hdmi), GFP_KERNEL);
3337-
if (!hdmi)
3338-
return ERR_PTR(-ENOMEM);
3336+
hdmi = devm_drm_bridge_alloc(dev, struct dw_hdmi, bridge, &dw_hdmi_bridge_funcs);
3337+
if (IS_ERR(hdmi))
3338+
return hdmi;
33393339

33403340
hdmi->plat_data = plat_data;
33413341
hdmi->dev = dev;
@@ -3495,7 +3495,6 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
34953495
}
34963496

34973497
hdmi->bridge.driver_private = hdmi;
3498-
hdmi->bridge.funcs = &dw_hdmi_bridge_funcs;
34993498
hdmi->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID
35003499
| DRM_BRIDGE_OP_HPD;
35013500
hdmi->bridge.interlace_allowed = true;

0 commit comments

Comments
 (0)