diff options
author | Maxime Ripard <maxime@cerno.tech> | 2022-07-11 19:39:35 +0200 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-07-13 10:46:13 +0200 |
commit | 374146cad469102b683939009f18fa88f9b9b6c9 (patch) | |
tree | acf8c3cdc732853d2ce05413a9a7a897bfaf602b /drivers/gpu/drm/vc4/vc4_hdmi.c | |
parent | 445b287e18ca374b5498e0f7cecb6c5f673c4edb (diff) | |
download | linux-374146cad469102b683939009f18fa88f9b9b6c9.tar.gz |
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.c | 5 |
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); |