Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp200589pxk; Thu, 17 Sep 2020 00:06:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzztB0WT97SboUwDcD8OzBGyktDoCOrp4+NFZ+phOVas2vWKP8kmz5agpmVDArWdRa0nX4b X-Received: by 2002:a17:906:4902:: with SMTP id b2mr28745341ejq.208.1600326371681; Thu, 17 Sep 2020 00:06:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600326371; cv=none; d=google.com; s=arc-20160816; b=TsgcWGQbJExg4xIXn2SsFvQ8PhavFZ0zMA3caf+1vGRJb8SRth40Tf4xM2OVmQIraI +kMAua3pH0qCYk8xRECChU0VWggwRAILxKaKG0Naen6N9gQnkroqWpXXLQOdtHrTX1x5 BFg1tYyNoedUuPWK1MGTXIpaAaWRP5FBFsWJNZg3M5u1PEIyjC9K6kQZDST6Hv95yM0s Ju97AQ+fA8No2FGZI+jX12Af+uyw0KgdxGPQ5aDZkd6ug99Ad6+eSsjVHeG4nnuP35w1 1BjqJa1uhELzjlf5iHJ35niVXPkZIs+ZUdnWrMbB5up6u9Ty9eRmMpadyWyQaT0d/vb0 xe9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=7y66JATs+T1hF1H+NYbCe253JN/QDEWHwhwkvBWFQmE=; b=rdT6i7i6CYYGVkp9vrXEpbdybSgzuHNyu7QDMAhUt3LeJ2Y5XFfykkoti1IJXnW49t /rTxAtKAnSyJERItRP0Qd3Fkd3j9CpfK7PlsOUSW3upGT68+CmwvMUx2SBcA23D/DrWX n2bT9NaA/pEZqZPyf5DDuuI0jOPe82y0VAtKMp5g61WHMHc7rMNkGo+sKZd04br5tno7 FiRNYzKPL1iif7FBTPBJaaiisCnYyH6biJDnjm/y9XvKm3o/yj8P7d9qUKC3j9eMG7Al IFqTl69EzJw2cuTHDGVLqH5pV95IW4ZIQtCQno/XtYd07eAioG1u9IHPqOUuzrIO8LW8 iIRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id co12si14073889edb.104.2020.09.17.00.05.48; Thu, 17 Sep 2020 00:06:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726265AbgIQHEb (ORCPT + 99 others); Thu, 17 Sep 2020 03:04:31 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:50714 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726200AbgIQHEI (ORCPT ); Thu, 17 Sep 2020 03:04:08 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id B753530BBAD9E1F7EDF3; Thu, 17 Sep 2020 14:48:16 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Thu, 17 Sep 2020 14:48:09 +0800 From: Liu Shixin To: Bjorn Helgaas CC: , , Liu Shixin Subject: [PATCH -next] PCI/IOV: use module_pci_driver to simplify the code Date: Thu, 17 Sep 2020 15:10:42 +0800 Message-ID: <20200917071042.1909191-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Liu Shixin --- drivers/pci/pci-pf-stub.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/pci/pci-pf-stub.c b/drivers/pci/pci-pf-stub.c index a0b2bd6c918a..45855a5e9fca 100644 --- a/drivers/pci/pci-pf-stub.c +++ b/drivers/pci/pci-pf-stub.c @@ -37,18 +37,6 @@ static struct pci_driver pf_stub_driver = { .probe = pci_pf_stub_probe, .sriov_configure = pci_sriov_configure_simple, }; - -static int __init pci_pf_stub_init(void) -{ - return pci_register_driver(&pf_stub_driver); -} - -static void __exit pci_pf_stub_exit(void) -{ - pci_unregister_driver(&pf_stub_driver); -} - -module_init(pci_pf_stub_init); -module_exit(pci_pf_stub_exit); +module_pci_driver(pf_stub_driver); MODULE_LICENSE("GPL"); -- 2.25.1