]> git.baikalelectronics.ru Git - kernel.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)
committerMaxime Ripard <maxime@cerno.tech>
Fri, 24 Sep 2021 17:25:33 +0000 (19:25 +0200)
commit222c32e78f35240daf54cc4072a6fd18ea513220
treef4ef3c70b284febdbe6ecf025249ef4ed758e13a
parent146fa2d156aa90272a89f1900e84fae576548b01
drm/mipi-dsi: Create devm device attachment

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
drivers/gpu/drm/drm_mipi_dsi.c
include/drm/drm_mipi_dsi.h