diff options
author | Liu Shixin <liushixin2@huawei.com> | 2020-09-14 14:54:03 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-10-02 21:52:53 -0400 |
commit | e4c6d2872e25fc101d008235eeace732dd888798 (patch) | |
tree | 908ae1c19538178e52451475ef109bf55496d982 /drivers/scsi/qlogicpti.c | |
parent | d30fbf2ce12f12d197dbd8ee647627369d96e712 (diff) |
scsi: qlogicpti: 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/qlogicpti.c')
-rw-r--r-- | drivers/scsi/qlogicpti.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 3790e8b70bba..465533964bc0 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c @@ -1468,22 +1468,10 @@ static struct platform_driver qpti_sbus_driver = { .probe = qpti_sbus_probe, .remove = qpti_sbus_remove, }; - -static int __init qpti_init(void) -{ - return platform_driver_register(&qpti_sbus_driver); -} - -static void __exit qpti_exit(void) -{ - platform_driver_unregister(&qpti_sbus_driver); -} +module_platform_driver(qpti_sbus_driver); MODULE_DESCRIPTION("QlogicISP SBUS driver"); MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); MODULE_LICENSE("GPL"); MODULE_VERSION("2.1"); MODULE_FIRMWARE("qlogic/isp1000.bin"); - -module_init(qpti_init); -module_exit(qpti_exit); |