Re: [PATCH] drm/msm/dp: unregister audio driver during unbind

From: Abhinav Kumar
Date: Fri Apr 21 2023 - 14:42:18 EST




On 4/21/2023 7:56 AM, Srinivas Kandagatla wrote:
while binding the code always registers a audio driver, however there
is no corresponding unregistration done in unbind. This leads to multiple
redundant audio platform devices if dp_display_bind and dp_display_unbind
happens multiple times during startup. On X13s platform this resulted in
6 to 9 audio codec device instead of just 3 codec devices for 3 dp ports.

Fix this by unregistering codecs on unbind.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
---

Fixes: d13e36d7d222 ("drm/msm/dp: add audio support for Display Port on MSM")

Reviewed-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>

(pls ignore the line break in the fixes tag, its a mail editor issue, I will apply the tag properly while applying to -fixes)