Commit 07def587 authored by Liu Shixin's avatar Liu Shixin Committed by Borislav Petkov
Browse files

EDAC/aspeed: Use module_platform_driver() to simplify



Use module_platform_driver() which makes the code simpler by eliminating
boilerplate code.

Signed-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Reviewed-by: default avatarJoel Stanley <joel@jms.id.au>
Link: https://lkml.kernel.org/r/20200914065358.3726216-1-liushixin2@huawei.com
parent fbd4ab78
Loading
Loading
Loading
Loading
+1 −17
Original line number Diff line number Diff line
@@ -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>");