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:55 +0200 |
commit | ea0dc2002ef58ff5629fda5275391a8c12bae848 (patch) | |
tree | 7ddff2df671ebb8f88cb9473c1b7053af822f3f3 /drivers/scsi/sun_esp.c | |
parent | scsi: sun3x_esp: Use module_platform_driver to simplify the code (diff) | |
download | linux-ea0dc2002ef58ff5629fda5275391a8c12bae848.tar.xz linux-ea0dc2002ef58ff5629fda5275391a8c12bae848.zip |
scsi: sun_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/sun_esp.c')
-rw-r--r-- | drivers/scsi/sun_esp.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c index 964130d2c8a6..5dc38d35745b 100644 --- a/drivers/scsi/sun_esp.c +++ b/drivers/scsi/sun_esp.c @@ -606,21 +606,9 @@ static struct platform_driver esp_sbus_driver = { .probe = esp_sbus_probe, .remove = esp_sbus_remove, }; - -static int __init sunesp_init(void) -{ - return platform_driver_register(&esp_sbus_driver); -} - -static void __exit sunesp_exit(void) -{ - platform_driver_unregister(&esp_sbus_driver); -} +module_platform_driver(esp_sbus_driver); MODULE_DESCRIPTION("Sun ESP SCSI driver"); MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); MODULE_LICENSE("GPL"); MODULE_VERSION(DRV_VERSION); - -module_init(sunesp_init); -module_exit(sunesp_exit); |