linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] mmc: toshsd: use module_pci_driver to simplify the code
@ 2014-12-09  1:08 weiyj_lk
  2014-12-19 10:48 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: weiyj_lk @ 2014-12-09  1:08 UTC (permalink / raw)
  To: Chris Ball, Ulf Hansson, Dan Carpenter, Ondrej Zary
  Cc: Wei Yongjun, linux-mmc

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/mmc/host/toshsd.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/mmc/host/toshsd.c b/drivers/mmc/host/toshsd.c
index 4666262..e5d8dec 100644
--- a/drivers/mmc/host/toshsd.c
+++ b/drivers/mmc/host/toshsd.c
@@ -699,18 +699,7 @@ static struct pci_driver toshsd_driver = {
 	.driver.pm = &toshsd_pm_ops,
 };
 
-static int __init toshsd_drv_init(void)
-{
-	return pci_register_driver(&toshsd_driver);
-}
-
-static void __exit toshsd_drv_exit(void)
-{
-	pci_unregister_driver(&toshsd_driver);
-}
-
-module_init(toshsd_drv_init);
-module_exit(toshsd_drv_exit);
+module_pci_driver(toshsd_driver);
 
 MODULE_AUTHOR("Ondrej Zary, Richard Betts");
 MODULE_DESCRIPTION("Toshiba PCI Secure Digital Host Controller Interface driver");


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] mmc: toshsd: use module_pci_driver to simplify the code
  2014-12-09  1:08 [PATCH -next] mmc: toshsd: use module_pci_driver to simplify the code weiyj_lk
@ 2014-12-19 10:48 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2014-12-19 10:48 UTC (permalink / raw)
  To: weiyj_lk; +Cc: Chris Ball, Dan Carpenter, Ondrej Zary, Wei Yongjun, linux-mmc

On 9 December 2014 at 02:08,  <weiyj_lk@163.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Use the module_pci_driver() macro to make the code simpler
> by eliminating module_init and module_exit calls.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Thanks! Queued for 3.20.

Kind regards
Uffe

> ---
>  drivers/mmc/host/toshsd.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/mmc/host/toshsd.c b/drivers/mmc/host/toshsd.c
> index 4666262..e5d8dec 100644
> --- a/drivers/mmc/host/toshsd.c
> +++ b/drivers/mmc/host/toshsd.c
> @@ -699,18 +699,7 @@ static struct pci_driver toshsd_driver = {
>         .driver.pm = &toshsd_pm_ops,
>  };
>
> -static int __init toshsd_drv_init(void)
> -{
> -       return pci_register_driver(&toshsd_driver);
> -}
> -
> -static void __exit toshsd_drv_exit(void)
> -{
> -       pci_unregister_driver(&toshsd_driver);
> -}
> -
> -module_init(toshsd_drv_init);
> -module_exit(toshsd_drv_exit);
> +module_pci_driver(toshsd_driver);
>
>  MODULE_AUTHOR("Ondrej Zary, Richard Betts");
>  MODULE_DESCRIPTION("Toshiba PCI Secure Digital Host Controller Interface driver");
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-19 10:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-09  1:08 [PATCH -next] mmc: toshsd: use module_pci_driver to simplify the code weiyj_lk
2014-12-19 10:48 ` Ulf Hansson

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).