drm/kms_helper: Add a common place to call init and exit functions.
[deliverable/linux.git] / drivers / gpu / drm / drm_fb_helper.c
index 76a364e620811d0f828eab3a1b1c939f95b6c9ba..46a2b1c55bd691a219c2a06281b8c234a7804c68 100644 (file)
@@ -2196,9 +2196,9 @@ EXPORT_SYMBOL(drm_fb_helper_hotplug_event);
  * but the module doesn't depend on any fb console symbols.  At least
  * attempt to load fbcon to avoid leaving the system without a usable console.
  */
-#if defined(CONFIG_FRAMEBUFFER_CONSOLE_MODULE) && !defined(CONFIG_EXPERT)
-static int __init drm_fb_helper_modinit(void)
+int __init drm_fb_helper_modinit(void)
 {
+#if defined(CONFIG_FRAMEBUFFER_CONSOLE_MODULE) && !defined(CONFIG_EXPERT)
        const char *name = "fbcon";
        struct module *fbcon;
 
@@ -2208,8 +2208,7 @@ static int __init drm_fb_helper_modinit(void)
 
        if (!fbcon)
                request_module_nowait(name);
+#endif
        return 0;
 }
-
-module_init(drm_fb_helper_modinit);
-#endif
+EXPORT_SYMBOL(drm_fb_helper_modinit);
This page took 0.024943 seconds and 5 git commands to generate.