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)
commita1419fb4a73e47f0eab2985dff594ed52397471b
tree1f807bfe943265a529ede33566f20a7e0542b0de
parent209264a85707ddd94bb4fdb89d808509c5e9fafa
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