aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4/vc4_hdmi.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2022-07-11 19:39:35 +0200
committerMaxime Ripard <maxime@cerno.tech>2022-07-13 10:46:13 +0200
commit374146cad469102b683939009f18fa88f9b9b6c9 (patch)
treeacf8c3cdc732853d2ce05413a9a7a897bfaf602b /drivers/gpu/drm/vc4/vc4_hdmi.c
parentdrm/vc4: debugfs: Simplify debugfs registration (diff)
downloadlinux-dev-374146cad469102b683939009f18fa88f9b9b6c9.tar.xz
linux-dev-374146cad469102b683939009f18fa88f9b9b6c9.zip
drm/vc4: Switch to drmm_mutex_init
mutex_init is supposed to be balanced by a call to mutex_destroy that we were never doing in the vc4 driver. Since a DRM-managed mutex_init variant has been introduced, let's just switch to it. Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20220711173939.1132294-66-maxime@cerno.tech
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_hdmi.c')
-rw-r--r--drivers/gpu/drm/vc4/vc4_hdmi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index 4acc865576f0..6f61a1b8a1a3 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -3270,7 +3270,10 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
if (!vc4_hdmi)
return -ENOMEM;
- mutex_init(&vc4_hdmi->mutex);
+ ret = drmm_mutex_init(drm, &vc4_hdmi->mutex);
+ if (ret)
+ return ret;
+
spin_lock_init(&vc4_hdmi->hw_lock);
INIT_DELAYED_WORK(&vc4_hdmi->scrambling_work, vc4_hdmi_scrambling_wq);