media: staging: atomisp: Using module_pci_driver
authorYueHaibing <yuehaibing@huawei.com>
Sat, 21 Apr 2018 09:23:43 +0000 (05:23 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 16 May 2018 14:26:46 +0000 (10:26 -0400)
Remove boilerplate code by using macro module_pci_driver.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c

index ba20344..aaae663 100644 (file)
@@ -1554,18 +1554,7 @@ static struct pci_driver atomisp_pci_driver = {
        .remove = atomisp_pci_remove,
 };
 
-static int __init atomisp_init(void)
-{
-       return pci_register_driver(&atomisp_pci_driver);
-}
-
-static void __exit atomisp_exit(void)
-{
-       pci_unregister_driver(&atomisp_pci_driver);
-}
-
-module_init(atomisp_init);
-module_exit(atomisp_exit);
+module_pci_driver(atomisp_pci_driver);
 
 MODULE_AUTHOR("Wen Wang <wen.w.wang@intel.com>");
 MODULE_AUTHOR("Xiaolin Zhang <xiaolin.zhang@intel.com>");