linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Muhammad Falak R Wani <falakreyaz@gmail.com>,
	"James E.J. Bottomley" <JBottomley@odin.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Ondrej Zary <linux@rainbow-software.org>,
	Fida Mohammad <fmthoker@gmail.com>
Subject: Re: [PATCH] scsi: wd719x: Use module_pci_driver
Date: Thu, 22 Oct 2015 09:23:21 +0200	[thread overview]
Message-ID: <1445498601.16404.19.camel@suse.de> (raw)
In-Reply-To: <1445467581-26377-1-git-send-email-falakreyaz@gmail.com>

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 <falakreyaz@gmail.com>
> ---
>  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 <jthumshirn@suse.de>

      reply	other threads:[~2015-10-22  7:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 22:46 [PATCH] scsi: wd719x: Use module_pci_driver Muhammad Falak R Wani
2015-10-22  7:23 ` Johannes Thumshirn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445498601.16404.19.camel@suse.de \
    --to=jthumshirn@suse.de \
    --cc=JBottomley@odin.com \
    --cc=falakreyaz@gmail.com \
    --cc=fmthoker@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@rainbow-software.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).