diff options
author | Liu Shixin <liushixin2@huawei.com> | 2020-09-14 08:54:03 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-10-03 03:52:53 +0200 |
commit | d30fbf2ce12f12d197dbd8ee647627369d96e712 (patch) | |
tree | 369f70d0c91ffe1b0c4387748e01205f167ff4bf /drivers/scsi/mac_esp.c | |
parent | scsi: jazz_esp: Use module_platform_driver to simplify the code (diff) | |
download | linux-d30fbf2ce12f12d197dbd8ee647627369d96e712.tar.xz linux-d30fbf2ce12f12d197dbd8ee647627369d96e712.zip |
scsi: mac_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/mac_esp.c')
-rw-r--r-- | drivers/scsi/mac_esp.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c index 1c78bc10c790..6d23ab5aee56 100644 --- a/drivers/scsi/mac_esp.c +++ b/drivers/scsi/mac_esp.c @@ -439,22 +439,10 @@ static struct platform_driver esp_mac_driver = { .name = DRV_MODULE_NAME, }, }; - -static int __init mac_esp_init(void) -{ - return platform_driver_register(&esp_mac_driver); -} - -static void __exit mac_esp_exit(void) -{ - platform_driver_unregister(&esp_mac_driver); -} +module_platform_driver(esp_mac_driver); MODULE_DESCRIPTION("Mac ESP SCSI driver"); MODULE_AUTHOR("Finn Thain"); MODULE_LICENSE("GPL v2"); MODULE_VERSION(DRV_VERSION); MODULE_ALIAS("platform:" DRV_MODULE_NAME); - -module_init(mac_esp_init); -module_exit(mac_esp_exit); |