From patchwork Fri Sep 25 15:08:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shraddha Barke X-Patchwork-Id: 7265821 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F32CF9F6DA for ; Fri, 25 Sep 2015 15:09:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3844D20B24 for ; Fri, 25 Sep 2015 15:09:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4CD5520B63 for ; Fri, 25 Sep 2015 15:09:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756656AbbIYPJL (ORCPT ); Fri, 25 Sep 2015 11:09:11 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:34328 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756478AbbIYPJK (ORCPT ); Fri, 25 Sep 2015 11:09:10 -0400 Received: by padhy16 with SMTP id hy16so108387109pad.1 for ; Fri, 25 Sep 2015 08:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AtsYZ43WDbNcVdCCw+5mVFALlCm7tVsqVZEjT37q3Hc=; b=EWSnhPMouLkqymA/J5aGFoJCophp9+XsPCQ/f8yoGFNNKtnbl3Pm6TCSd2pqK2FrYs F64YWTUR8ludqMTUpT8dxV2+8YSNxUk8DMm3lixLEQ+eT1Y3We8HJuWvLCFVi8qye1ig vK4pKjsUZlAL2m29hsf+owAys08q6KL/cau1y+5KcZrmZ6Z2UHUGJjKLnaAXZ4NUvfCL fAUbftvRt9Uuvk4vMqQlA2lMwCTyNULNxYBgQRmB6WeNdX9neLs5+lanNmthMAx16mWo Z76KE6yVmAhmutpM/VWrw4lB9zSZT5ipBn2FdZ7AQi6ESLEmI7judYHHgnuEi1UMvT3R xV1g== X-Received: by 10.66.161.7 with SMTP id xo7mr7743086pab.57.1443193750145; Fri, 25 Sep 2015 08:09:10 -0700 (PDT) Received: from shraddha-370R4E-370R4V-370R5E-3570RE-370R5V.bits-goa.ac.in ([103.225.100.51]) by smtp.gmail.com with ESMTPSA id gx11sm4446208pbd.82.2015.09.25.08.09.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Sep 2015 08:09:09 -0700 (PDT) From: Shraddha Barke To: "James E.J. Bottomley" , Hannes Reinecke , Oliver Neukum Cc: linux-scsi@vger.kernel.org, Shraddha Barke Subject: [PATCH 3/4] Scsi: dc395x.c: Use module_pci_driver Date: Fri, 25 Sep 2015 20:38:50 +0530 Message-Id: <1443193731-12587-3-git-send-email-shraddha.6596@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1443193731-12587-1-git-send-email-shraddha.6596@gmail.com> References: <1443193731-12587-1-git-send-email-shraddha.6596@gmail.com> X-Cyberoam-smtpxy-version: 1.0.6.3 X-Cyberoam-AV-Policy: default X-CTCH-PVer: 0000001 X-CTCH-Spam: Unknown X-CTCH-VOD: Unknown X-CTCH-Flags: 0 X-CTCH-RefID: str=0001.0A150209.56056394.010F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-Score: 0.000 X-CTCH-ScoreCust: 0.000 X-CTCH-Rules: Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use module_pci_driver for drivers whose init and exit functions only register and unregister respectively Signed-off-by: Shraddha Barke Reviewed-by: Hannes Reinecke --- 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 5ee7f44..a0a6eaf 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -4870,30 +4870,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");