]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mipi-dsi: Create devm device registration
authorMaxime Ripard <maxime@cerno.tech>
Fri, 10 Sep 2021 10:11:57 +0000 (12:11 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Fri, 24 Sep 2021 17:25:27 +0000 (19:25 +0200)
commit146fa2d156aa90272a89f1900e84fae576548b01
tree1f807bfe943265a529ede33566f20a7e0542b0de
parentf8bdc80bac9aa9525411bc1ad45f4cc061d3ecaf
drm/mipi-dsi: Create devm device registration

Devices that take their data through the MIPI-DSI bus but are controlled
through a secondary bus like I2C have to register a secondary device on
the MIPI-DSI bus through the mipi_dsi_device_register_full() function.

At removal or when an error occurs, that device needs to be removed
through a call to mipi_dsi_device_unregister().

Let's create a device-managed variant of the registration function that
will automatically unregister 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-4-maxime@cerno.tech
drivers/gpu/drm/drm_mipi_dsi.c
include/drm/drm_mipi_dsi.h