From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964824AbbJVHXZ (ORCPT ); Thu, 22 Oct 2015 03:23:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:48510 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932518AbbJVHXX (ORCPT ); Thu, 22 Oct 2015 03:23:23 -0400 Message-ID: <1445498601.16404.19.camel@suse.de> Subject: Re: [PATCH] scsi: wd719x: Use module_pci_driver From: Johannes Thumshirn To: Muhammad Falak R Wani , "James E.J. Bottomley" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ondrej Zary , Fida Mohammad Date: Thu, 22 Oct 2015 09:23:21 +0200 In-Reply-To: <1445467581-26377-1-git-send-email-falakreyaz@gmail.com> References: <1445467581-26377-1-git-send-email-falakreyaz@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.0 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-10-22 at 04:16 +0530, Muhammad Falak R Wani wrote: > 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 > --- >  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"); Reviewed-by: Johannes Thumshirn