summaryrefslogtreecommitdiff
path: root/drivers/edac
diff options
context:
space:
mode:
authorLiu Shixin <liushixin2@huawei.com>2020-09-14 14:53:58 +0800
committerBorislav Petkov <bp@suse.de>2020-09-18 09:14:01 +0200
commit07def58717dab4ff0055c61c316df65d59c53c83 (patch)
treedd081642f6d02926f8049656bc16f1269c64b8f9 /drivers/edac
parentfbd4ab780284aeb66374223fa3ac0cd47611aebe (diff)
EDAC/aspeed: Use module_platform_driver() to simplify
Use module_platform_driver() which makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Joel Stanley <joel@jms.id.au> Link: https://lkml.kernel.org/r/20200914065358.3726216-1-liushixin2@huawei.com
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/aspeed_edac.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
index fbec28dc661d..fde809efc520 100644
--- a/drivers/edac/aspeed_edac.c
+++ b/drivers/edac/aspeed_edac.c
@@ -388,23 +388,7 @@ static struct platform_driver aspeed_driver = {
.probe = aspeed_probe,
.remove = aspeed_remove
};
-
-
-static int __init aspeed_init(void)
-{
- return platform_driver_register(&aspeed_driver);
-}
-
-
-static void __exit aspeed_exit(void)
-{
- platform_driver_unregister(&aspeed_driver);
-}
-
-
-module_init(aspeed_init);
-module_exit(aspeed_exit);
-
+module_platform_driver(aspeed_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Stefan Schaeckeler <sschaeck@cisco.com>");