drm/i915: Add a module_init() directive master
authorFrançois Tigeot <ftigeot@wolfpond.org>
Tue, 19 Jun 2018 21:13:09 +0000 (23:13 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Tue, 19 Jun 2018 21:13:26 +0000 (23:13 +0200)
sys/dev/drm/i915/i915_drv.c

index 5356c77..214984e 100644 (file)
@@ -1824,8 +1824,6 @@ i915_attach(device_t kdev)
        int error;
        int dummy;
 
-       i915_init();
-
        dev->driver = &driver;
        error = drm_attach(kdev, i915_attach_list);
 
@@ -1896,6 +1894,8 @@ static void __exit i915_exit(void)
 }
 #endif
 
+module_init(i915_init);
+
 DRIVER_MODULE_ORDERED(i915, vgapci, i915_driver, drm_devclass, NULL, NULL, SI_ORDER_ANY);
 MODULE_DEPEND(i915, drm, 1, 1, 1);
 #ifdef CONFIG_ACPI