From 4f1a7007d688a792b6b929220d7f68a25eb493be Mon Sep 17 00:00:00 2001 From: YueHaibing Date: Sat, 21 Apr 2018 17:51:48 +0800 Subject: 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 --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/gpu/drm/hisilicon') 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 "); -- cgit v1.2.3