diff mbox

[-next] mmc: toshsd: use module_pci_driver to simplify the code

Message ID 1418087285-14334-1-git-send-email-weiyj_lk@163.com (mailing list archive)
State New, archived
Headers show

Commit Message

weiyj_lk@163.com Dec. 9, 2014, 1:08 a.m. UTC
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(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Ulf Hansson Dec. 19, 2014, 10:48 a.m. UTC | #1
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");
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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");