linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] cw1200: use module_spi_driver to simplify the code
@ 2013-05-30 11:42 Wei Yongjun
  2013-06-01 12:02 ` Solomon Peachy
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-05-30 11:42 UTC (permalink / raw)
  To: pizza, linville; +Cc: yongjun_wei, linux-wireless

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

module_spi_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/net/wireless/cw1200/cw1200_spi.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/net/wireless/cw1200/cw1200_spi.c b/drivers/net/wireless/cw1200/cw1200_spi.c
index 04af685..1e6c58d 100644
--- a/drivers/net/wireless/cw1200/cw1200_spi.c
+++ b/drivers/net/wireless/cw1200/cw1200_spi.c
@@ -464,17 +464,4 @@ static struct spi_driver spi_driver = {
 	},
 };
 
-/* Init Module function -> Called by insmod */
-static int __init cw1200_spi_init(void)
-{
-	return spi_register_driver(&spi_driver);
-}
-
-/* Called at Driver Unloading */
-static void __exit cw1200_spi_exit(void)
-{
-	spi_unregister_driver(&spi_driver);
-}
-
-module_init(cw1200_spi_init);
-module_exit(cw1200_spi_exit);
+module_spi_driver(spi_driver);


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

* Re: [PATCH -next] cw1200: use module_spi_driver to simplify the code
  2013-05-30 11:42 [PATCH -next] cw1200: use module_spi_driver to simplify the code Wei Yongjun
@ 2013-06-01 12:02 ` Solomon Peachy
  0 siblings, 0 replies; 2+ messages in thread
From: Solomon Peachy @ 2013-06-01 12:02 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: linville, yongjun_wei, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1553 bytes --]

On Thu, May 30, 2013 at 07:42:54PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> module_spi_driver() makes the code simpler by eliminating
> boilerplate code.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Acked-by: Solomon Peachy <pizza@shaftnet.org>

> ---
>  drivers/net/wireless/cw1200/cw1200_spi.c | 15 +--------------
>  1 file changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/drivers/net/wireless/cw1200/cw1200_spi.c b/drivers/net/wireless/cw1200/cw1200_spi.c
> index 04af685..1e6c58d 100644
> --- a/drivers/net/wireless/cw1200/cw1200_spi.c
> +++ b/drivers/net/wireless/cw1200/cw1200_spi.c
> @@ -464,17 +464,4 @@ static struct spi_driver spi_driver = {
>  	},
>  };
>  
> -/* Init Module function -> Called by insmod */
> -static int __init cw1200_spi_init(void)
> -{
> -	return spi_register_driver(&spi_driver);
> -}
> -
> -/* Called at Driver Unloading */
> -static void __exit cw1200_spi_exit(void)
> -{
> -	spi_unregister_driver(&spi_driver);
> -}
> -
> -module_init(cw1200_spi_init);
> -module_exit(cw1200_spi_exit);
> +module_spi_driver(spi_driver);
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Solomon Peachy        		       pizza at shaftnet dot org	 
Delray Beach, FL                          ^^ (mail/jabber) ^^
Quidquid latine dictum sit, altum viditur.

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

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

end of thread, other threads:[~2013-06-01 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30 11:42 [PATCH -next] cw1200: use module_spi_driver to simplify the code Wei Yongjun
2013-06-01 12:02 ` Solomon Peachy

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).