summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sun3x_esp.c
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:55 +0200
commit2d00ffe725a955926769c884c7c4a94623ee49c7 (patch)
tree0fc1b0e56087e6084f76f960fa25befe131080fe /drivers/scsi/sun3x_esp.c
parentscsi: sni_53c710: Use module_platform_driver to simplify the code (diff)
downloadlinux-2d00ffe725a955926769c884c7c4a94623ee49c7.tar.xz
linux-2d00ffe725a955926769c884c7c4a94623ee49c7.zip
scsi: sun3x_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>
Diffstat (limited to 'drivers/scsi/sun3x_esp.c')
-rw-r--r--drivers/scsi/sun3x_esp.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/scsi/sun3x_esp.c b/drivers/scsi/sun3x_esp.c
index f37df79e37e1..7de82f2c9757 100644
--- a/drivers/scsi/sun3x_esp.c
+++ b/drivers/scsi/sun3x_esp.c
@@ -270,22 +270,10 @@ static struct platform_driver esp_sun3x_driver = {
.name = "sun3x_esp",
},
};
-
-static int __init sun3x_esp_init(void)
-{
- return platform_driver_register(&esp_sun3x_driver);
-}
-
-static void __exit sun3x_esp_exit(void)
-{
- platform_driver_unregister(&esp_sun3x_driver);
-}
+module_platform_driver(esp_sun3x_driver);
MODULE_DESCRIPTION("Sun3x ESP SCSI driver");
MODULE_AUTHOR("Thomas Bogendoerfer (tsbogend@alpha.franken.de)");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
-
-module_init(sun3x_esp_init);
-module_exit(sun3x_esp_exit);
MODULE_ALIAS("platform:sun3x_esp");