Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp202799pxk; Thu, 17 Sep 2020 00:10:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmuAQ2VoypM/RD4bMDLlShtXzjLmmB3injTJYz0d76OlgrhRcMUjW4iQ2SgWU0UZcCjnrn X-Received: by 2002:aa7:d981:: with SMTP id u1mr30716850eds.250.1600326627848; Thu, 17 Sep 2020 00:10:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600326627; cv=none; d=google.com; s=arc-20160816; b=se+GGQ1KV1Aw9GZt2Ny/hzzrpQNt8IWnIjhlCBh3eOmHfkKuMG5u2qvthHPmofHGiH ajB7jGIQe194fknQUL8Uv1V8pAnQziNkqNDaNZ41QXrCFQignTW0ZzrsSazLzBF0w8U1 Y71bSWYYyOmwN1Aa/X4WEGIndWRTf4W+BdIr2lQvruMfULx5xPjxjciQt1PGX1nB0R3z kHKc+xRb/yJ5vjOclNXM+saG7ZODfaY93kP9w/i8x6ZXw/T6RXSFaeNF1G2QRDsAjSRW ep1KcMlm90VorJhWH2ys7zr5zqaeq9/KmLIdcgC1bCDQ+Y6/e13x3LOnH52ykYcj850k mlrw== 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=FN+0qA50I8Qg0gSE2oezfMJ336zxdMxplMcuWqnXLBM=; b=iJY8RzA9MiinFPUwc4hSoX5lxlEDWmIgempeNeuJNSi78+6FeAUPHoyGp3xUVnAFHZ bw6fY/e1RoFau/3aplJ/4YW4kK10TcP1igQlobDSQIwaQgavQJYvw0IqZuQ0uRKWd+OP p9z9HNq4DrgsUnfqc4mxVabmGX9QBNZs1ae3loD/aUk8ZBZK6KWqiWLzzcT32kmRJjs7 L/vnRV323jqlu44JrmvscfNDvnxERbLcWRGECFRA4OEr76IxnvPwpuP4dVULV3r7lpfH EXhLtHUpcX29Jtlgeo1C4ive5WV+InyTVMfZtg03ARgjUBm2VlneRFf9uvGCog0ZhyPa ztYA== 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 f24si13784117edr.375.2020.09.17.00.10.03; Thu, 17 Sep 2020 00:10:27 -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 S1726196AbgIQHJK (ORCPT + 99 others); Thu, 17 Sep 2020 03:09:10 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:59270 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726109AbgIQHJG (ORCPT ); Thu, 17 Sep 2020 03:09:06 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 4C3EFF1F76C25FDA1F18; Thu, 17 Sep 2020 14:48:20 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Thu, 17 Sep 2020 14:48:10 +0800 From: Liu Shixin To: Oliver Neukum , Ali Akcaagac , "Jamie Lenehan" , "James E.J. Bottomley" , "Martin K. Petersen" CC: , , , Liu Shixin Subject: [PATCH -next] scsi: dc395x: use module_pci_driver to simplify the code Date: Thu, 17 Sep 2020 15:10:44 +0800 Message-ID: <20200917071044.1909268-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/scsi/dc395x.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 0c251a3b99b7..fa16894d8758 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -4721,30 +4721,7 @@ static struct pci_driver dc395x_driver = { .probe = dc395x_init_one, .remove = dc395x_remove_one, }; - - -/** - * dc395x_module_init - Module initialization function - * - * Used by both module and built-in driver to initialise this driver. - **/ -static int __init dc395x_module_init(void) -{ - return pci_register_driver(&dc395x_driver); -} - - -/** - * dc395x_module_exit - Module cleanup function. - **/ -static void __exit dc395x_module_exit(void) -{ - pci_unregister_driver(&dc395x_driver); -} - - -module_init(dc395x_module_init); -module_exit(dc395x_module_exit); +module_pci_driver(dc395x_driver); MODULE_AUTHOR("C.L. Huang / Erich Chen / Kurt Garloff"); MODULE_DESCRIPTION("SCSI host adapter driver for Tekram TRM-S1040 based adapters: Tekram DC395 and DC315 series"); -- 2.25.1