ATH10K Archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Kalle Valo <kvalo@kernel.org>, Jeff Johnson <jjohnson@kernel.org>,
	Brian Norris <briannorris@chromium.org>,
	Ajay Singh <ajay.kathat@microchip.com>,
	Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	linux-wireless@vger.kernel.org, ath10k@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH 2/6] wifi: ath6kl: sdio: simplify module initialization
Date: Fri, 29 Mar 2024 18:10:15 +0100	[thread overview]
Message-ID: <20240329171019.63836-2-krzysztof.kozlowski@linaro.org> (raw)
In-Reply-To: <20240329171019.63836-1-krzysztof.kozlowski@linaro.org>

This driver's initialization functions do not perform any custom code,
except printing messages.  Printing messages on modules
loading/unloading is discouraged because it pollutes the dmesg
regardless whether user actually has this device.  Core kernel code
already gives tools to investigate whether module was loaded or not.

Drop the printing messages which allows to replace open-coded
module_sdio_driver().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---
---
 drivers/net/wireless/ath/ath6kl/sdio.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index 8a43c48ec1cf..9ab091044706 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -1427,25 +1427,7 @@ static struct sdio_driver ath6kl_sdio_driver = {
 	.remove = ath6kl_sdio_remove,
 	.drv.pm = ATH6KL_SDIO_PM_OPS,
 };
-
-static int __init ath6kl_sdio_init(void)
-{
-	int ret;
-
-	ret = sdio_register_driver(&ath6kl_sdio_driver);
-	if (ret)
-		ath6kl_err("sdio driver registration failed: %d\n", ret);
-
-	return ret;
-}
-
-static void __exit ath6kl_sdio_exit(void)
-{
-	sdio_unregister_driver(&ath6kl_sdio_driver);
-}
-
-module_init(ath6kl_sdio_init);
-module_exit(ath6kl_sdio_exit);
+module_sdio_driver(ath6kl_sdio_driver);
 
 MODULE_AUTHOR("Atheros Communications, Inc.");
 MODULE_DESCRIPTION("Driver support for Atheros AR600x SDIO devices");
-- 
2.34.1



  reply	other threads:[~2024-03-29 17:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 17:10 [PATCH 1/6] wifi: ath10k: sdio: simplify module initialization Krzysztof Kozlowski
2024-03-29 17:10 ` Krzysztof Kozlowski [this message]
2024-04-04 10:13   ` [PATCH 2/6] wifi: ath6kl: " Kalle Valo
2024-03-29 17:10 ` [PATCH 3/6] wifi: rsi: " Krzysztof Kozlowski
2024-04-05  9:00   ` [3/6] " Kalle Valo
2024-03-29 17:10 ` [PATCH 4/6] wifi: ti: wl1251: " Krzysztof Kozlowski
2024-03-29 17:10 ` [PATCH 5/6] wifi: microchip: wilc1000: replace open-coded module_sdio_driver() Krzysztof Kozlowski
2024-03-29 17:10 ` [PATCH 6/6] wifi: marvell: mwifiex: " Krzysztof Kozlowski
2024-03-31 20:26   ` Francesco Dolcini
2024-03-29 17:22 ` [PATCH 1/6] wifi: ath10k: sdio: simplify module initialization Jeff Johnson
2024-04-03 13:50   ` Kalle Valo
2024-04-03 13:55     ` Krzysztof Kozlowski
2024-04-03 14:02     ` Krzysztof Kozlowski
2024-04-03 14:25       ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240329171019.63836-2-krzysztof.kozlowski@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=ajay.kathat@microchip.com \
    --cc=ath10k@lists.infradead.org \
    --cc=briannorris@chromium.org \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=jjohnson@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).