Skip to content

Commit 7fe58bf

Browse files
lucaceresoliFomys
authored andcommitted
drm/bridge: tda998x: convert to devm_drm_bridge_alloc() API
This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-12-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
1 parent ed6987b commit 7fe58bf

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/gpu/drm/bridge/tda998x_drv.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,9 +1781,9 @@ static int tda998x_create(struct device *dev)
17811781
u32 video;
17821782
int rev_lo, rev_hi, ret;
17831783

1784-
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
1785-
if (!priv)
1786-
return -ENOMEM;
1784+
priv = devm_drm_bridge_alloc(dev, struct tda998x_priv, bridge, &tda998x_bridge_funcs);
1785+
if (IS_ERR(priv))
1786+
return PTR_ERR(priv);
17871787

17881788
dev_set_drvdata(dev, priv);
17891789

@@ -1948,7 +1948,6 @@ static int tda998x_create(struct device *dev)
19481948
tda998x_audio_codec_init(priv, &client->dev);
19491949
}
19501950

1951-
priv->bridge.funcs = &tda998x_bridge_funcs;
19521951
#ifdef CONFIG_OF
19531952
priv->bridge.of_node = dev->of_node;
19541953
#endif

0 commit comments

Comments
 (0)