Skip to content

Commit

Permalink
scsi: sun3x_esp: Use module_platform_driver to simplify the code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liu Shixin authored and Martin K. Petersen committed Oct 3, 2020
1 parent a3b73c9 commit 2d00ffe
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions drivers/scsi/sun3x_esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

0 comments on commit 2d00ffe

Please sign in to comment.