Skip to content

Commit 4eda21d

Browse files
committed
drm/lima: use module_platform_driver helper
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
1 parent 2ce216e commit 4eda21d

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

‎drivers/gpu/drm/lima/lima_drv.c‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -460,17 +460,7 @@ static struct platform_driver lima_platform_driver = {
460460
},
461461
};
462462

463-
static int __init lima_init(void)
464-
{
465-
return platform_driver_register(&lima_platform_driver);
466-
}
467-
module_init(lima_init);
468-
469-
static void __exit lima_exit(void)
470-
{
471-
platform_driver_unregister(&lima_platform_driver);
472-
}
473-
module_exit(lima_exit);
463+
module_platform_driver(lima_platform_driver);
474464

475465
MODULE_AUTHOR("Lima Project Developers");
476466
MODULE_DESCRIPTION("Lima DRM Driver");

0 commit comments

Comments
 (0)