Message ID | 20180421092343.18848-1-yuehaibing@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c index 548e00e..f95a5d0 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c @@ -1555,18 +1555,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>");
Remove boilerplate code by using macro module_pci_driver. Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)