Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Liu Shixin and committed by
Martin K. Petersen
d30fbf2c 7fc83de5

+1 -13
+1 -13
drivers/scsi/mac_esp.c
··· 439 439 .name = DRV_MODULE_NAME, 440 440 }, 441 441 }; 442 - 443 - static int __init mac_esp_init(void) 444 - { 445 - return platform_driver_register(&esp_mac_driver); 446 - } 447 - 448 - static void __exit mac_esp_exit(void) 449 - { 450 - platform_driver_unregister(&esp_mac_driver); 451 - } 442 + module_platform_driver(esp_mac_driver); 452 443 453 444 MODULE_DESCRIPTION("Mac ESP SCSI driver"); 454 445 MODULE_AUTHOR("Finn Thain"); 455 446 MODULE_LICENSE("GPL v2"); 456 447 MODULE_VERSION(DRV_VERSION); 457 448 MODULE_ALIAS("platform:" DRV_MODULE_NAME); 458 - 459 - module_init(mac_esp_init); 460 - module_exit(mac_esp_exit);