* [PATCH -next] mmc: cavium: Use module_pci_driver to simplify the code
@ 2017-04-25 3:14 Wei Yongjun
2017-04-25 6:02 ` Jan Glauber
2017-04-25 7:57 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2017-04-25 3:14 UTC (permalink / raw)
To: Jan Glauber, David Daney, Steven J. Hill, Ulf Hansson
Cc: Wei Yongjun, linux-mmc
From: Wei Yongjun <weiyongjun1@huawei.com>
Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/mmc/host/cavium-thunderx.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c
index 65244e8..fe3d772 100644
--- a/drivers/mmc/host/cavium-thunderx.c
+++ b/drivers/mmc/host/cavium-thunderx.c
@@ -179,18 +179,7 @@ static struct pci_driver thunder_mmc_driver = {
.remove = thunder_mmc_remove,
};
-static int __init thunder_mmc_init_module(void)
-{
- return pci_register_driver(&thunder_mmc_driver);
-}
-
-static void __exit thunder_mmc_exit_module(void)
-{
- pci_unregister_driver(&thunder_mmc_driver);
-}
-
-module_init(thunder_mmc_init_module);
-module_exit(thunder_mmc_exit_module);
+module_pci_driver(thunder_mmc_driver);
MODULE_AUTHOR("Cavium Inc.");
MODULE_DESCRIPTION("Cavium ThunderX eMMC Driver");
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] mmc: cavium: Use module_pci_driver to simplify the code
2017-04-25 3:14 [PATCH -next] mmc: cavium: Use module_pci_driver to simplify the code Wei Yongjun
@ 2017-04-25 6:02 ` Jan Glauber
2017-04-25 7:57 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Jan Glauber @ 2017-04-25 6:02 UTC (permalink / raw)
To: Wei Yongjun
Cc: David Daney, Steven J. Hill, Ulf Hansson, Wei Yongjun, linux-mmc
On Tue, Apr 25, 2017 at 03:14:09AM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Use the module_pci_driver() macro to make the code simpler
> by eliminating module_init and module_exit calls.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/mmc/host/cavium-thunderx.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c
> index 65244e8..fe3d772 100644
> --- a/drivers/mmc/host/cavium-thunderx.c
> +++ b/drivers/mmc/host/cavium-thunderx.c
> @@ -179,18 +179,7 @@ static struct pci_driver thunder_mmc_driver = {
> .remove = thunder_mmc_remove,
> };
>
> -static int __init thunder_mmc_init_module(void)
> -{
> - return pci_register_driver(&thunder_mmc_driver);
> -}
> -
> -static void __exit thunder_mmc_exit_module(void)
> -{
> - pci_unregister_driver(&thunder_mmc_driver);
> -}
> -
> -module_init(thunder_mmc_init_module);
> -module_exit(thunder_mmc_exit_module);
> +module_pci_driver(thunder_mmc_driver);
>
> MODULE_AUTHOR("Cavium Inc.");
> MODULE_DESCRIPTION("Cavium ThunderX eMMC Driver");
>
>
Acked-by: Jan Glauber <jglauber@cavium.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] mmc: cavium: Use module_pci_driver to simplify the code
2017-04-25 3:14 [PATCH -next] mmc: cavium: Use module_pci_driver to simplify the code Wei Yongjun
2017-04-25 6:02 ` Jan Glauber
@ 2017-04-25 7:57 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2017-04-25 7:57 UTC (permalink / raw)
To: Wei Yongjun
Cc: Jan Glauber, David Daney, Steven J. Hill, Wei Yongjun, linux-mmc
On 25 April 2017 at 05:14, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Use the module_pci_driver() macro to make the code simpler
> by eliminating module_init and module_exit calls.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Thanks, applied for next!
Kind regards
Uffe
> ---
> drivers/mmc/host/cavium-thunderx.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c
> index 65244e8..fe3d772 100644
> --- a/drivers/mmc/host/cavium-thunderx.c
> +++ b/drivers/mmc/host/cavium-thunderx.c
> @@ -179,18 +179,7 @@ static struct pci_driver thunder_mmc_driver = {
> .remove = thunder_mmc_remove,
> };
>
> -static int __init thunder_mmc_init_module(void)
> -{
> - return pci_register_driver(&thunder_mmc_driver);
> -}
> -
> -static void __exit thunder_mmc_exit_module(void)
> -{
> - pci_unregister_driver(&thunder_mmc_driver);
> -}
> -
> -module_init(thunder_mmc_init_module);
> -module_exit(thunder_mmc_exit_module);
> +module_pci_driver(thunder_mmc_driver);
>
> MODULE_AUTHOR("Cavium Inc.");
> MODULE_DESCRIPTION("Cavium ThunderX eMMC Driver");
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-25 7:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-25 3:14 [PATCH -next] mmc: cavium: Use module_pci_driver to simplify the code Wei Yongjun
2017-04-25 6:02 ` Jan Glauber
2017-04-25 7:57 ` Ulf Hansson
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.