Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Liu Shixin and committed by
Borislav Petkov
07def587 fbd4ab78

+1 -17
+1 -17
drivers/edac/aspeed_edac.c
··· 388 388 .probe = aspeed_probe, 389 389 .remove = aspeed_remove 390 390 }; 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); 408 392 409 393 MODULE_LICENSE("GPL"); 410 394 MODULE_AUTHOR("Stefan Schaeckeler <sschaeck@cisco.com>");