linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath6kl: convert a driver to use module_usb_driver()
@ 2014-08-01 16:11 Himangi Saraogi
  2014-08-04  6:13 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Himangi Saraogi @ 2014-08-01 16:11 UTC (permalink / raw)
  To: Kalle Valo, John W. Linville, linux-wireless, netdev,
	linux-kernel
  Cc: Julia Lawall

This converts a driver in drivers/net/* to use the
module_usb_driver() macro which makes the code smaller and a
bit simpler.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
---
 drivers/net/wireless/ath/ath6kl/usb.c | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c
index c443258..a6a5e40 100644
--- a/drivers/net/wireless/ath/ath6kl/usb.c
+++ b/drivers/net/wireless/ath/ath6kl/usb.c
@@ -1229,26 +1229,7 @@ static struct usb_driver ath6kl_usb_driver = {
 	.disable_hub_initiated_lpm = 1,
 };
 
-static int ath6kl_usb_init(void)
-{
-	int ret;
-
-	ret = usb_register(&ath6kl_usb_driver);
-	if (ret) {
-		ath6kl_err("usb registration failed: %d\n", ret);
-		return ret;
-	}
-
-	return 0;
-}
-
-static void ath6kl_usb_exit(void)
-{
-	usb_deregister(&ath6kl_usb_driver);
-}
-
-module_init(ath6kl_usb_init);
-module_exit(ath6kl_usb_exit);
+module_usb_driver(ath6kl_usb_driver);
 
 MODULE_AUTHOR("Atheros Communications, Inc.");
 MODULE_DESCRIPTION("Driver support for Atheros AR600x USB devices");
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ath6kl: convert a driver to use module_usb_driver()
  2014-08-01 16:11 [PATCH] ath6kl: convert a driver to use module_usb_driver() Himangi Saraogi
@ 2014-08-04  6:13 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2014-08-04  6:13 UTC (permalink / raw)
  To: Himangi Saraogi
  Cc: John W. Linville, linux-wireless, netdev, linux-kernel,
	Julia Lawall, ath6kl

Himangi Saraogi <himangi774@gmail.com> writes:

> This converts a driver in drivers/net/* to use the
> module_usb_driver() macro which makes the code smaller and a
> bit simpler.
>
> Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
> Acked-by: Julia Lawall <julia.lawall@lip6.fr>

Thanks, applied.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-04  6:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01 16:11 [PATCH] ath6kl: convert a driver to use module_usb_driver() Himangi Saraogi
2014-08-04  6:13 ` 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).