From patchwork Sat Apr 21 09:23:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10354027 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6650F602B7 for ; Sat, 21 Apr 2018 09:23:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48E33288E4 for ; Sat, 21 Apr 2018 09:23:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D4302890B; Sat, 21 Apr 2018 09:23:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87079288E4 for ; Sat, 21 Apr 2018 09:23:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751008AbeDUJXv (ORCPT ); Sat, 21 Apr 2018 05:23:51 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:58588 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750855AbeDUJXv (ORCPT ); Sat, 21 Apr 2018 05:23:51 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 98590F861B561; Sat, 21 Apr 2018 17:23:47 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.361.1; Sat, 21 Apr 2018 17:23:44 +0800 From: YueHaibing To: , CC: , Subject: [PATCH] media: staging: atomisp: Using module_pci_driver. Date: Sat, 21 Apr 2018 17:23:43 +0800 Message-ID: <20180421092343.18848-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove boilerplate code by using macro module_pci_driver. Signed-off-by: YueHaibing --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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 "); MODULE_AUTHOR("Xiaolin Zhang ");