]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/mipi-dsi: Create devm device attachment
authorMaxime Ripard <maxime@cerno.tech>
Fri, 10 Sep 2021 10:11:58 +0000 (12:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:08:19 +0000 (11:08 +0100)
commit52541851a8d1a28bf06f654bc93a1d5a0d792dfb
tree8aa6b8e7caf8dc5ac8b2036afc832e1653c396c0
parenta20d6ecd261a6eb648ac11cd66e2d2bbb3b2c817
drm/mipi-dsi: Create devm device attachment

[ Upstream commit db6568498b35a4d5d5a99420df27ed25fae31406 ]

MIPI-DSI devices need to call mipi_dsi_attach() when their probe is done
to attach against their host.

However, at removal or when an error occurs, that attachment needs to be
undone through a call to mipi_dsi_detach().

Let's create a device-managed variant of the attachment function that
will automatically detach the device at unbind.

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210910101218.1632297-5-maxime@cerno.tech
Stable-dep-of: 941882a0e96d ("drm/bridge: lt8912b: Fix bridge_detach")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/drm_mipi_dsi.c
include/drm/drm_mipi_dsi.h