]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/lima: use module_platform_driver helper
authorQiang Yu <yuq825@gmail.com>
Tue, 21 Apr 2020 13:35:42 +0000 (21:35 +0800)
committerQiang Yu <yuq825@gmail.com>
Fri, 24 Apr 2020 12:47:16 +0000 (20:47 +0800)
Simplify module init/exit with module_platform_driver.

Tested-by: Bhushan Shah <bshah@kde.org>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200421133551.31481-2-yuq825@gmail.com
drivers/gpu/drm/lima/lima_drv.c

index 4e5dd75822c0f292e5208cf62b70326aff602acc..3d63d496cfc2fe99ab0d854ebc4e6ba0e6df1324 100644 (file)
@@ -460,17 +460,7 @@ static struct platform_driver lima_platform_driver = {
        },
 };
 
-static int __init lima_init(void)
-{
-       return platform_driver_register(&lima_platform_driver);
-}
-module_init(lima_init);
-
-static void __exit lima_exit(void)
-{
-       platform_driver_unregister(&lima_platform_driver);
-}
-module_exit(lima_exit);
+module_platform_driver(lima_platform_driver);
 
 MODULE_AUTHOR("Lima Project Developers");
 MODULE_DESCRIPTION("Lima DRM Driver");