drm/stm: Use drm_module_platform_driver() to register the driver
authorJavier Martinez Canillas <javierm@redhat.com>
Fri, 17 Dec 2021 00:37:30 +0000 (01:37 +0100)
committerJavier Martinez Canillas <javierm@redhat.com>
Thu, 27 Jan 2022 18:15:47 +0000 (19:15 +0100)
The macro calls to a DRM specific platform driver init handler that checks
whether the driver is allowed to be registered or not.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20211217003752.3946210-16-javierm@redhat.com
drivers/gpu/drm/stm/drv.c

index 9f441aa..0da7cce 100644 (file)
@@ -22,6 +22,7 @@
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
+#include <drm/drm_module.h>
 #include <drm/drm_probe_helper.h>
 #include <drm/drm_vblank.h>
 
@@ -241,7 +242,7 @@ static struct platform_driver stm_drm_platform_driver = {
        },
 };
 
-module_platform_driver(stm_drm_platform_driver);
+drm_module_platform_driver(stm_drm_platform_driver);
 
 MODULE_AUTHOR("Philippe Cornu <philippe.cornu@st.com>");
 MODULE_AUTHOR("Yannick Fertre <yannick.fertre@st.com>");