summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Ceresoli <luca.ceresoli@bootlin.com>2025-04-24 20:59:21 +0200
committerLouis Chauvet <louis.chauvet@bootlin.com>2025-04-29 11:21:23 +0200
commit91c5c7b5bb2dd09b43b025bce6d790d3c79f4518 (patch)
tree9aa78bd4a38ffad02f2e62d42f8498b9d3c646c2
parenta4754ae9cfa76fbce79f023c268a5bac56f36321 (diff)
drm/exynos: mic: 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> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-14-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_mic.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
index b34ec6728337..29a8366513fa 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
@@ -379,11 +379,11 @@ static int exynos_mic_probe(struct platform_device *pdev)
struct resource res;
int ret, i;
- mic = devm_kzalloc(dev, sizeof(*mic), GFP_KERNEL);
- if (!mic) {
+ mic = devm_drm_bridge_alloc(dev, struct exynos_mic, bridge, &mic_bridge_funcs);
+ if (IS_ERR(mic)) {
DRM_DEV_ERROR(dev,
"mic: Failed to allocate memory for MIC object\n");
- ret = -ENOMEM;
+ ret = PTR_ERR(mic);
goto err;
}
@@ -421,7 +421,6 @@ static int exynos_mic_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, mic);
- mic->bridge.funcs = &mic_bridge_funcs;
mic->bridge.of_node = dev->of_node;
drm_bridge_add(&mic->bridge);