Skip to content

Commit 40c25b9

Browse files
lucaceresoliFomys
authored andcommitted
drm/mcde: 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: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-15-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
1 parent 91c5c7b commit 40c25b9

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/gpu/drm/mcde/mcde_dsi.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,6 @@ static int mcde_dsi_bind(struct device *dev, struct device *master,
11381138
d->bridge_out = bridge;
11391139

11401140
/* Create a bridge for this DSI channel */
1141-
d->bridge.funcs = &mcde_dsi_bridge_funcs;
11421141
d->bridge.of_node = dev->of_node;
11431142
drm_bridge_add(&d->bridge);
11441143

@@ -1174,9 +1173,9 @@ static int mcde_dsi_probe(struct platform_device *pdev)
11741173
u32 dsi_id;
11751174
int ret;
11761175

1177-
d = devm_kzalloc(dev, sizeof(*d), GFP_KERNEL);
1178-
if (!d)
1179-
return -ENOMEM;
1176+
d = devm_drm_bridge_alloc(dev, struct mcde_dsi, bridge, &mcde_dsi_bridge_funcs);
1177+
if (IS_ERR(d))
1178+
return PTR_ERR(d);
11801179
d->dev = dev;
11811180
platform_set_drvdata(pdev, d);
11821181

0 commit comments

Comments
 (0)