[PATCH 1/2] drm/mipi-dsi: Unregister bus at exit

Takashi Iwai tiwai at suse.de
Tue Aug 2 12:16:42 UTC 2016


This is a preliminary patch for building drm-mipi-dsi as a module.
Add the module exit callback to unregister the bus properly.

Suggested-by: Thierry Reding <treding at nvidia.com>
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
 drivers/gpu/drm/drm_mipi_dsi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index f5d80839a90c..e2f3441663be 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -1069,6 +1069,12 @@ static int __init mipi_dsi_bus_init(void)
 }
 postcore_initcall(mipi_dsi_bus_init);
 
+static void __exit mipi_dsi_bus_exit(void)
+{
+	bus_unregister(&mipi_dsi_bus_type);
+}
+module_exit(mipi_dsi_bus_exit);
+
 MODULE_AUTHOR("Andrzej Hajda <a.hajda at samsung.com>");
 MODULE_DESCRIPTION("MIPI DSI Bus");
 MODULE_LICENSE("GPL and additional rights");
-- 
2.9.2



More information about the dri-devel mailing list