Skip to content

Commit 6287ffd

Browse files
lucaceresoliFomys
authored andcommitted
drm/bridge: lt9611uxc: 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-7-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
1 parent 4e90a3d commit 6287ffd

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/gpu/drm/bridge/lontium-lt9611uxc.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -775,9 +775,9 @@ static int lt9611uxc_probe(struct i2c_client *client)
775775
return -ENODEV;
776776
}
777777

778-
lt9611uxc = devm_kzalloc(dev, sizeof(*lt9611uxc), GFP_KERNEL);
779-
if (!lt9611uxc)
780-
return -ENOMEM;
778+
lt9611uxc = devm_drm_bridge_alloc(dev, struct lt9611uxc, bridge, &lt9611uxc_bridge_funcs);
779+
if (IS_ERR(lt9611uxc))
780+
return PTR_ERR(lt9611uxc);
781781

782782
lt9611uxc->dev = dev;
783783
lt9611uxc->client = client;
@@ -856,7 +856,6 @@ static int lt9611uxc_probe(struct i2c_client *client)
856856

857857
i2c_set_clientdata(client, lt9611uxc);
858858

859-
lt9611uxc->bridge.funcs = &lt9611uxc_bridge_funcs;
860859
lt9611uxc->bridge.of_node = client->dev.of_node;
861860
lt9611uxc->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID;
862861
if (lt9611uxc->hpd_supported)

0 commit comments

Comments
 (0)