drm/bridge: anx7625: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-3-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
This commit is contained in:
Luca Ceresoli 2025-05-09 15:53:29 +02:00
parent bdfc5b2927
commit 7a909b2bea

View File

@ -2596,7 +2596,6 @@ static int anx7625_link_bridge(struct drm_dp_aux *aux)
return ret;
}
platform->bridge.funcs = &anx7625_bridge_funcs;
platform->bridge.of_node = dev->of_node;
if (!anx7625_of_panel_on_aux_bus(dev))
platform->bridge.ops |= DRM_BRIDGE_OP_EDID;
@ -2630,10 +2629,10 @@ static int anx7625_i2c_probe(struct i2c_client *client)
return -ENODEV;
}
platform = devm_kzalloc(dev, sizeof(*platform), GFP_KERNEL);
if (!platform) {
platform = devm_drm_bridge_alloc(dev, struct anx7625_data, bridge, &anx7625_bridge_funcs);
if (IS_ERR(platform)) {
DRM_DEV_ERROR(dev, "fail to allocate driver data\n");
return -ENOMEM;
return PTR_ERR(platform);
}
pdata = &platform->pdata;