Skip to content

Commit 07def58

Browse files
Liu Shixinsuryasaimadhu
authored andcommitted
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
1 parent fbd4ab7 commit 07def58

1 file changed

Lines changed: 1 addition & 17 deletions

File tree

drivers/edac/aspeed_edac.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -388,23 +388,7 @@ static struct platform_driver aspeed_driver = {
388388
.probe = aspeed_probe,
389389
.remove = aspeed_remove
390390
};
391-
392-
393-
static int __init aspeed_init(void)
394-
{
395-
return platform_driver_register(&aspeed_driver);
396-
}
397-
398-
399-
static void __exit aspeed_exit(void)
400-
{
401-
platform_driver_unregister(&aspeed_driver);
402-
}
403-
404-
405-
module_init(aspeed_init);
406-
module_exit(aspeed_exit);
407-
391+
module_platform_driver(aspeed_driver);
408392

409393
MODULE_LICENSE("GPL");
410394
MODULE_AUTHOR("Stefan Schaeckeler <sschaeck@cisco.com>");

0 commit comments

Comments
 (0)