summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/hisilicon
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-04-21 17:51:48 +0800
committerXinliang Liu <z.liuxinliang@hisilicon.com>2019-08-26 15:21:33 +0800
commit4f1a7007d688a792b6b929220d7f68a25eb493be (patch)
treea53f3f9d18e10610d2e00c1550a05b6257f005e5 /drivers/gpu/drm/hisilicon
parent34044cd2955b54fb9141be31d12500bb589aa6c8 (diff)
drm/hisilicon/hibmc: Using module_pci_driver.
Remove boilerplate code by using macro module_pci_driver. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Xinliang Liu <z.liuxinliang@hisilicon.com> Signed-off-by: Xinliang Liu <z.liuxinliang@hisilicon.com>
Diffstat (limited to 'drivers/gpu/drm/hisilicon')
-rw-r--r--drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index 2ae538835781..5a9fa8783a4d 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -394,18 +394,7 @@ static struct pci_driver hibmc_pci_driver = {
.driver.pm = &hibmc_pm_ops,
};
-static int __init hibmc_init(void)
-{
- return pci_register_driver(&hibmc_pci_driver);
-}
-
-static void __exit hibmc_exit(void)
-{
- return pci_unregister_driver(&hibmc_pci_driver);
-}
-
-module_init(hibmc_init);
-module_exit(hibmc_exit);
+module_pci_driver(hibmc_pci_driver);
MODULE_DEVICE_TABLE(pci, hibmc_pci_table);
MODULE_AUTHOR("RongrongZou <zourongrong@huawei.com>");