From patchwork Wed Oct 21 22:46:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Falak R Wani X-Patchwork-Id: 7461311 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 65019BEEA4 for ; Wed, 21 Oct 2015 22:42:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23497208F7 for ; Wed, 21 Oct 2015 22:42:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5471B20861 for ; Wed, 21 Oct 2015 22:41:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964826AbbJUWlq (ORCPT ); Wed, 21 Oct 2015 18:41:46 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:33714 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753681AbbJUWlp (ORCPT ); Wed, 21 Oct 2015 18:41:45 -0400 Received: by padfb7 with SMTP id fb7so7069912pad.0; Wed, 21 Oct 2015 15:41:44 -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; bh=0ueFgmysYzy0QyrdbxrxbnhHh7tFAi/XORtB9ymZ/cg=; b=mzViEB2c0XtMve67rL383khCNOqBoTsm/eRXeSdqa4VGSq0+kuwiKsAU6WtUtO9z4F 6OvbSo8t2Va2JiY8Gx9l+6Hvxn+p/72oEvk3aFptBQuJv1eB6BshqUsF/RDdwkSAEQCw cTmBbYUzFXmCkmwNbEBUC2wT7x/j+ScbOHZ+sBwTE0ra7rMxgLqSB46cXW31KhHNrerV 5WNSIX59LqeY27v9gNfuxX3qd4e746+1Ox19LhxB9ES352c0vqk4d9OU5rAQ0jqV/A0X 5o5je54g/4CXHg+PUe/0MgOdi/ARcic82+Wt5uK2/w8mvUwmyN/9isuB9MT1jw30UpyB KYBg== X-Received: by 10.68.164.4 with SMTP id ym4mr13312562pbb.103.1445467304678; Wed, 21 Oct 2015 15:41:44 -0700 (PDT) Received: from localhost.localdomain ([1.39.34.53]) by smtp.gmail.com with ESMTPSA id v13sm10953873pbs.51.2015.10.21.15.41.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Oct 2015 15:41:44 -0700 (PDT) From: Muhammad Falak R Wani To: "James E.J. Bottomley" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ondrej Zary , Fida Mohammad , Muhammad Falak R Wani Subject: [PATCH] scsi: wd719x: Use module_pci_driver Date: Thu, 22 Oct 2015 04:16:21 +0530 Message-Id: <1445467581-26377-1-git-send-email-falakreyaz@gmail.com> X-Mailer: git-send-email 1.9.1 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 Remove boilerplate code by using macro module_pci_driver. For drivers whose __init and __exit paths only register and unregister to the pci API, it is preferred to use this macro. Signed-off-by: Muhammad Falak R Wani Reviewed-by: Johannes Thumshirn --- drivers/scsi/wd719x.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c index 2a9da2e..6d3bce3 100644 --- a/drivers/scsi/wd719x.c +++ b/drivers/scsi/wd719x.c @@ -976,18 +976,7 @@ static struct pci_driver wd719x_pci_driver = { .remove = wd719x_pci_remove, }; -static int __init wd719x_init(void) -{ - return pci_register_driver(&wd719x_pci_driver); -} - -static void __exit wd719x_exit(void) -{ - pci_unregister_driver(&wd719x_pci_driver); -} - -module_init(wd719x_init); -module_exit(wd719x_exit); +module_pci_driver(wd719x_pci_driver); MODULE_DESCRIPTION("Western Digital WD7193/7197/7296 SCSI driver"); MODULE_AUTHOR("Ondrej Zary, Aaron Dewell, Juergen Gaertner");