From a3b73c96b4aed11658245c258802941641d8048f Mon Sep 17 00:00:00 2001 From: Liu Shixin Date: Mon, 14 Sep 2020 14:54:03 +0800 Subject: [PATCH] scsi: sni_53c710: Use module_platform_driver to simplify the code Use module_platform_driver() to eliminate boilerplate code. Link: https://lore.kernel.org/r/20200914065403.3726462-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Martin K. Petersen --- drivers/scsi/sni_53c710.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/scsi/sni_53c710.c b/drivers/scsi/sni_53c710.c index 03d43f016397..9e2e196bc202 100644 --- a/drivers/scsi/sni_53c710.c +++ b/drivers/scsi/sni_53c710.c @@ -124,16 +124,4 @@ static struct platform_driver snirm710_driver = { .name = "snirm_53c710", }, }; - -static int __init snirm710_init(void) -{ - return platform_driver_register(&snirm710_driver); -} - -static void __exit snirm710_exit(void) -{ - platform_driver_unregister(&snirm710_driver); -} - -module_init(snirm710_init); -module_exit(snirm710_exit); +module_platform_driver(snirm710_driver);