Skip to content

Commit a4754ae

Browse files
lucaceresoliFomys
authored andcommitted
drm/bridge: ti-sn65dsi86: convert to devm_drm_bridge_alloc() API
This is the new API for allocating DRM bridges. Reviewed-by: Herve Codina <herve.codina@bootlin.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Tested-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-13-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
1 parent 7fe58bf commit a4754ae

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/gpu/drm/bridge/ti-sn65dsi86.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,6 @@ static int ti_sn_bridge_probe(struct auxiliary_device *adev,
13171317
if (ret)
13181318
return ret;
13191319

1320-
pdata->bridge.funcs = &ti_sn_bridge_funcs;
13211320
pdata->bridge.of_node = np;
13221321
pdata->bridge.type = pdata->next_bridge->type == DRM_MODE_CONNECTOR_DisplayPort
13231322
? DRM_MODE_CONNECTOR_DisplayPort : DRM_MODE_CONNECTOR_eDP;
@@ -1907,9 +1906,9 @@ static int ti_sn65dsi86_probe(struct i2c_client *client)
19071906
return -ENODEV;
19081907
}
19091908

1910-
pdata = devm_kzalloc(dev, sizeof(struct ti_sn65dsi86), GFP_KERNEL);
1911-
if (!pdata)
1912-
return -ENOMEM;
1909+
pdata = devm_drm_bridge_alloc(dev, struct ti_sn65dsi86, bridge, &ti_sn_bridge_funcs);
1910+
if (IS_ERR(pdata))
1911+
return PTR_ERR(pdata);
19131912
dev_set_drvdata(dev, pdata);
19141913
pdata->dev = dev;
19151914

0 commit comments

Comments
 (0)