All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt.org>
To: Devendra Naga <devendra.aaru@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] r6040: use module_pci_driver macro
Date: Sun, 8 Jul 2012 23:39:17 +0200	[thread overview]
Message-ID: <201207082339.17996.florian@openwrt.org> (raw)
In-Reply-To: <1341763077-938-1-git-send-email-devendra.aaru@gmail.com>

Le dimanche 08 juillet 2012 17:57:57, Devendra Naga a écrit :
> as the manual of module_pci_driver says that
> it can be used when the init and exit functions of
> the module does nothing but the pci_register_driver
> and pci_unregister_driver.
> 
> use it for rdc's r6040 driver, as the init and exit
> paths does as above, and also this reduces a little
> amount of code.
> 
> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>

Acked-by: Florian Fainelli <florian@openwrt.org>

> ---
>  drivers/net/ethernet/rdc/r6040.c |   15 +--------------
>  1 file changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/drivers/net/ethernet/rdc/r6040.c
> b/drivers/net/ethernet/rdc/r6040.c index 9acc026..557a265 100644
> --- a/drivers/net/ethernet/rdc/r6040.c
> +++ b/drivers/net/ethernet/rdc/r6040.c
> @@ -1277,17 +1277,4 @@ static struct pci_driver r6040_driver = {
>  	.remove		= __devexit_p(r6040_remove_one),
>  };
> 
> -
> -static int __init r6040_init(void)
> -{
> -	return pci_register_driver(&r6040_driver);
> -}
> -
> -
> -static void __exit r6040_cleanup(void)
> -{
> -	pci_unregister_driver(&r6040_driver);
> -}
> -
> -module_init(r6040_init);
> -module_exit(r6040_cleanup);
> +module_pci_driver(r6040_driver);

-- 
Florian

  reply	other threads:[~2012-07-08 21:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-08 15:57 [PATCH] r6040: use module_pci_driver macro Devendra Naga
2012-07-08 21:39 ` Florian Fainelli [this message]
2012-07-09 21:43   ` David Miller

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=201207082339.17996.florian@openwrt.org \
    --to=florian@openwrt.org \
    --cc=devendra.aaru@gmail.com \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.