From: YueHaibing Date: Sat, 21 Apr 2018 09:51:48 +0000 (+0800) Subject: drm/hisilicon/hibmc: Using module_pci_driver. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4f1a7007d688a792b6b929220d7f68a25eb493be;p=openwrt%2Fstaging%2Fblogic.git drm/hisilicon/hibmc: Using module_pci_driver. Remove boilerplate code by using macro module_pci_driver. Signed-off-by: YueHaibing Reviewed-by: Xinliang Liu Signed-off-by: Xinliang Liu --- 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 ");