]> www.infradead.org Git - nvme.git/commitdiff
drm/bridge/analogix/anx6345: Add missing drm_dp_aux_unregister() call
authorLyude Paul <lyude@redhat.com>
Fri, 19 Feb 2021 21:53:06 +0000 (16:53 -0500)
committerLyude Paul <lyude@redhat.com>
Tue, 23 Mar 2021 18:19:07 +0000 (14:19 -0400)
Another driver I found that seems to forget to unregister it's DP AUX
device. Let's fix this by adding anx6345_bridge_detach().

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-11-lyude@redhat.com
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c

index d9164fab044d03d05c4a6dca1bb39e092e0fbb1e..8e016ba7c54afeedfa67c6fd9b9340ff65349f95 100644 (file)
@@ -574,6 +574,11 @@ static int anx6345_bridge_attach(struct drm_bridge *bridge,
        return 0;
 }
 
+static void anx6345_bridge_detach(struct drm_bridge *bridge)
+{
+       drm_dp_aux_unregister(&bridge_to_anx6345(bridge)->aux);
+}
+
 static enum drm_mode_status
 anx6345_bridge_mode_valid(struct drm_bridge *bridge,
                          const struct drm_display_info *info,
@@ -624,6 +629,7 @@ static void anx6345_bridge_enable(struct drm_bridge *bridge)
 
 static const struct drm_bridge_funcs anx6345_bridge_funcs = {
        .attach = anx6345_bridge_attach,
+       .detach = anx6345_bridge_detach,
        .mode_valid = anx6345_bridge_mode_valid,
        .disable = anx6345_bridge_disable,
        .enable = anx6345_bridge_enable,