Commit d30fbf2c authored by Liu Shixin's avatar Liu Shixin Committed by Martin K. Petersen

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.comSigned-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 7fc83de5
...@@ -439,22 +439,10 @@ static struct platform_driver esp_mac_driver = { ...@@ -439,22 +439,10 @@ static struct platform_driver esp_mac_driver = {
.name = DRV_MODULE_NAME, .name = DRV_MODULE_NAME,
}, },
}; };
module_platform_driver(esp_mac_driver);
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_DESCRIPTION("Mac ESP SCSI driver"); MODULE_DESCRIPTION("Mac ESP SCSI driver");
MODULE_AUTHOR("Finn Thain"); MODULE_AUTHOR("Finn Thain");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_VERSION(DRV_VERSION); MODULE_VERSION(DRV_VERSION);
MODULE_ALIAS("platform:" DRV_MODULE_NAME); MODULE_ALIAS("platform:" DRV_MODULE_NAME);
module_init(mac_esp_init);
module_exit(mac_esp_exit);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment