summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2018-06-11 12:35:40 -0700
committerKalle Valo <kvalo@codeaurora.org>2018-06-14 18:13:53 +0300
commit0644fef97451908ef1048043b0a60d1324d8a522 (patch)
tree7fb8341b6e42835aa7be8facba4c325fbb4fa486
parent7f8f72d8511a7f57595ce166cd9fc7da94a8faf4 (diff)
downloadlinux-stable-0644fef97451908ef1048043b0a60d1324d8a522.tar.gz
linux-stable-0644fef97451908ef1048043b0a60d1324d8a522.tar.bz2
linux-stable-0644fef97451908ef1048043b0a60d1324d8a522.zip
ath10k: snoc: use module_platform_driver() macro
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>
-rw-r--r--drivers/net/wireless/ath/ath10k/snoc.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index 92ddb1c38c06..31d1e3af85a2 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");