diff options
author | Maxime Ripard <maxime@cerno.tech> | 2022-07-11 19:38:31 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-10-26 13:15:40 +0200 |
commit | c202cda08cd5693645d4990ad1eb2e8068a884ec (patch) | |
tree | 49e581b933fc6db3100f9d9f320342a1f1e624d9 /drivers/gpu/drm | |
parent | 9ec3f783f08b57a861700fdf4d3d8f3cfb68f471 (diff) | |
download | linux-stable-c202cda08cd5693645d4990ad1eb2e8068a884ec.tar.gz linux-stable-c202cda08cd5693645d4990ad1eb2e8068a884ec.tar.bz2 linux-stable-c202cda08cd5693645d4990ad1eb2e8068a884ec.zip |
drm/mipi-dsi: Detach devices when removing the host
[ Upstream commit 668a8f17b5290d04ef7343636a5588a0692731a1 ]
Whenever the MIPI-DSI host is unregistered, the code of
mipi_dsi_host_unregister() loops over every device currently found on that
bus and will unregister it.
However, it doesn't detach it from the bus first, which leads to all kind
of resource leaks if the host wants to perform some clean up whenever a
device is detached.
Fixes: 068a00233969 ("drm: Add MIPI DSI bus support")
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220711173939.1132294-2-maxime@cerno.tech
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/drm_mipi_dsi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index 99415808e9f9..af80cf8030b8 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -305,6 +305,7 @@ static int mipi_dsi_remove_device_fn(struct device *dev, void *priv) { struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev); + mipi_dsi_detach(dsi); mipi_dsi_device_unregister(dsi); return 0; |