summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Shixin <liushixin2@huawei.com>2020-09-14 08:54:03 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2020-10-03 03:52:52 +0200
commit7fc83de599fe411f7c81a63e8059534a0e561656 (patch)
treeb7533b8716eb74c5c53cb3edafd6f11651fa5eb7
parentscsi: mvumi: Fix error return in mvumi_io_attach() (diff)
downloadlinux-7fc83de599fe411f7c81a63e8059534a0e561656.tar.xz
linux-7fc83de599fe411f7c81a63e8059534a0e561656.zip
scsi: jazz_esp: 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 <liushixin2@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/jazz_esp.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/scsi/jazz_esp.c b/drivers/scsi/jazz_esp.c
index 7f683e42c798..f0ed6863cc70 100644
--- a/drivers/scsi/jazz_esp.c
+++ b/drivers/scsi/jazz_esp.c
@@ -201,21 +201,9 @@ static struct platform_driver esp_jazz_driver = {
.name = "jazz_esp",
},
};
-
-static int __init jazz_esp_init(void)
-{
- return platform_driver_register(&esp_jazz_driver);
-}
-
-static void __exit jazz_esp_exit(void)
-{
- platform_driver_unregister(&esp_jazz_driver);
-}
+module_platform_driver(esp_jazz_driver);
MODULE_DESCRIPTION("JAZZ ESP SCSI driver");
MODULE_AUTHOR("Thomas Bogendoerfer (tsbogend@alpha.franken.de)");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
-
-module_init(jazz_esp_init);
-module_exit(jazz_esp_exit);