Skip to content

Commit

Permalink
scsi: sun_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 2d00ffe commit ea0dc20
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions drivers/scsi/sun_esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit ea0dc20

Please sign in to comment.