* [PATCH] ath10k: snoc: use module_platform_driver() macro
@ 2018-06-11 19:35 Brian Norris
2018-06-12 11:24 ` Kalle Valo
2018-06-14 15:14 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Brian Norris @ 2018-06-11 19:35 UTC (permalink / raw)
To: Kalle Valo
Cc: ath10k, linux-wireless, Govind Singh, linux-kernel, Brian Norris
ath10k_snoc_init()/ath10k_snoc_exit() don't add much value;
module_platform_driver() can remove the boilerplate.
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
drivers/net/wireless/ath/ath10k/snoc.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index a3a7042fe13a..ee74e0060504 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -1388,25 +1388,7 @@ static struct platform_driver ath10k_snoc_driver = {
.of_match_table = ath10k_snoc_dt_match,
},
};
-
-static int __init ath10k_snoc_init(void)
-{
- int ret;
-
- ret = platform_driver_register(&ath10k_snoc_driver);
- if (ret)
- pr_err("failed to register ath10k snoc driver: %d\n",
- ret);
-
- return ret;
-}
-module_init(ath10k_snoc_init);
-
-static void __exit ath10k_snoc_exit(void)
-{
- platform_driver_unregister(&ath10k_snoc_driver);
-}
-module_exit(ath10k_snoc_exit);
+module_platform_driver(ath10k_snoc_driver);
MODULE_AUTHOR("Qualcomm");
MODULE_LICENSE("Dual BSD/GPL");
--
2.18.0.rc1.242.g61856ae69a-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ath10k: snoc: use module_platform_driver() macro
2018-06-11 19:35 [PATCH] ath10k: snoc: use module_platform_driver() macro Brian Norris
@ 2018-06-12 11:24 ` Kalle Valo
2018-06-14 15:14 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-06-12 11:24 UTC (permalink / raw)
To: Brian Norris; +Cc: Govind Singh, linux-wireless, linux-kernel, ath10k
Brian Norris <briannorris@chromium.org> writes:
> ath10k_snoc_init()/ath10k_snoc_exit() don't add much value;
> module_platform_driver() can remove the boilerplate.
>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---
> drivers/net/wireless/ath/ath10k/snoc.c | 20 +-------------------
> 1 file changed, 1 insertion(+), 19 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
> index a3a7042fe13a..ee74e0060504 100644
> --- a/drivers/net/wireless/ath/ath10k/snoc.c
> +++ b/drivers/net/wireless/ath/ath10k/snoc.c
> @@ -1388,25 +1388,7 @@ static struct platform_driver ath10k_snoc_driver = {
> .of_match_table = ath10k_snoc_dt_match,
> },
> };
> -
> -static int __init ath10k_snoc_init(void)
> -{
> - int ret;
> -
> - ret = platform_driver_register(&ath10k_snoc_driver);
> - if (ret)
> - pr_err("failed to register ath10k snoc driver: %d\n",
> - ret);
> -
> - return ret;
> -}
> -module_init(ath10k_snoc_init);
> -
> -static void __exit ath10k_snoc_exit(void)
> -{
> - platform_driver_unregister(&ath10k_snoc_driver);
> -}
> -module_exit(ath10k_snoc_exit);
> +module_platform_driver(ath10k_snoc_driver);
Yeah, makes sense. And I also checked that this shouldn't conflict with
Govind's qmi patch:
https://patchwork.kernel.org/patch/10448183/
--
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ath10k: snoc: use module_platform_driver() macro
2018-06-11 19:35 [PATCH] ath10k: snoc: use module_platform_driver() macro Brian Norris
2018-06-12 11:24 ` Kalle Valo
@ 2018-06-14 15:14 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-06-14 15:14 UTC (permalink / raw)
To: Brian Norris
Cc: Kalle Valo, ath10k, linux-wireless, Govind Singh, linux-kernel,
Brian Norris
Brian Norris <briannorris@chromium.org> wrote:
> ath10k_snoc_init()/ath10k_snoc_exit() don't add much value;
> module_platform_driver() can remove the boilerplate.
>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
0644fef97451 ath10k: snoc: use module_platform_driver() macro
--
https://patchwork.kernel.org/patch/10458705/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-14 15:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-11 19:35 [PATCH] ath10k: snoc: use module_platform_driver() macro Brian Norris
2018-06-12 11:24 ` Kalle Valo
2018-06-14 15:14 ` Kalle Valo
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).