All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] net: wireless: wl1251: Use module_spi_driver macro
@ 2013-05-29 10:18 ` Sachin Kamat
  0 siblings, 0 replies; 8+ messages in thread
From: Sachin Kamat @ 2013-05-29 10:18 UTC (permalink / raw)
  To: linux-wireless; +Cc: netdev, davem, coelho, linville, sachin.kamat

module_spi_driver() eliminates some boiler plate and makes code
simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/net/wireless/ti/wl1251/spi.c |   24 +-----------------------
 1 file changed, 1 insertion(+), 23 deletions(-)

diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
index 4c67c2f..dfd0877 100644
--- a/drivers/net/wireless/ti/wl1251/spi.c
+++ b/drivers/net/wireless/ti/wl1251/spi.c
@@ -329,29 +329,7 @@ static struct spi_driver wl1251_spi_driver = {
 	.remove		= wl1251_spi_remove,
 };
 
-static int __init wl1251_spi_init(void)
-{
-	int ret;
-
-	ret = spi_register_driver(&wl1251_spi_driver);
-	if (ret < 0) {
-		wl1251_error("failed to register spi driver: %d", ret);
-		goto out;
-	}
-
-out:
-	return ret;
-}
-
-static void __exit wl1251_spi_exit(void)
-{
-	spi_unregister_driver(&wl1251_spi_driver);
-
-	wl1251_notice("unloaded");
-}
-
-module_init(wl1251_spi_init);
-module_exit(wl1251_spi_exit);
+module_spi_driver(wl1251_spi_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Kalle Valo <kvalo@adurom.com>");
-- 
1.7.9.5


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

* [PATCH 1/2] net: wireless: wl1251: Use module_spi_driver macro
@ 2013-05-29 10:18 ` Sachin Kamat
  0 siblings, 0 replies; 8+ messages in thread
From: Sachin Kamat @ 2013-05-29 10:18 UTC (permalink / raw)
  To: linux-wireless-u79uwXL29TY76Z2rM5mHXA
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	coelho-l0cyMroinI0, linville-2XuSBdqkA4R54TAoqtyWWQ,
	sachin.kamat-QSEj5FYQhm4dnm+yROfE0A

module_spi_driver() eliminates some boiler plate and makes code
simpler.

Signed-off-by: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 drivers/net/wireless/ti/wl1251/spi.c |   24 +-----------------------
 1 file changed, 1 insertion(+), 23 deletions(-)

diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
index 4c67c2f..dfd0877 100644
--- a/drivers/net/wireless/ti/wl1251/spi.c
+++ b/drivers/net/wireless/ti/wl1251/spi.c
@@ -329,29 +329,7 @@ static struct spi_driver wl1251_spi_driver = {
 	.remove		= wl1251_spi_remove,
 };
 
-static int __init wl1251_spi_init(void)
-{
-	int ret;
-
-	ret = spi_register_driver(&wl1251_spi_driver);
-	if (ret < 0) {
-		wl1251_error("failed to register spi driver: %d", ret);
-		goto out;
-	}
-
-out:
-	return ret;
-}
-
-static void __exit wl1251_spi_exit(void)
-{
-	spi_unregister_driver(&wl1251_spi_driver);
-
-	wl1251_notice("unloaded");
-}

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

* [PATCH 2/2] net: wireless: wl1251: Fix commenting style
@ 2013-05-29 10:18   ` Sachin Kamat
  0 siblings, 0 replies; 8+ messages in thread
From: Sachin Kamat @ 2013-05-29 10:18 UTC (permalink / raw)
  To: linux-wireless; +Cc: netdev, davem, coelho, linville, sachin.kamat

Make the commenting style consistent with networking block comment
style as suggested by checkpatch.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/net/wireless/ti/wl1251/spi.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
index dfd0877..c7dc6fe 100644
--- a/drivers/net/wireless/ti/wl1251/spi.c
+++ b/drivers/net/wireless/ti/wl1251/spi.c
@@ -93,8 +93,7 @@ static void wl1251_spi_wake(struct wl1251 *wl)
 	memset(&t, 0, sizeof(t));
 	spi_message_init(&m);
 
-	/*
-	 * Set WSPI_INIT_COMMAND
+	/* Set WSPI_INIT_COMMAND
 	 * the data is being send from the MSB to LSB
 	 */
 	cmd[2] = 0xff;
@@ -262,7 +261,8 @@ static int wl1251_spi_probe(struct spi_device *spi)
 	wl->if_ops = &wl1251_spi_ops;
 
 	/* This is the only SPI value that we need to set here, the rest
-	 * comes from the board-peripherals file */
+	 * comes from the board-peripherals file
+	 */
 	spi->bits_per_word = 32;
 
 	ret = spi_setup(spi);
-- 
1.7.9.5


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

* [PATCH 2/2] net: wireless: wl1251: Fix commenting style
@ 2013-05-29 10:18   ` Sachin Kamat
  0 siblings, 0 replies; 8+ messages in thread
From: Sachin Kamat @ 2013-05-29 10:18 UTC (permalink / raw)
  To: linux-wireless-u79uwXL29TY76Z2rM5mHXA
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	coelho-l0cyMroinI0, linville-2XuSBdqkA4R54TAoqtyWWQ,
	sachin.kamat-QSEj5FYQhm4dnm+yROfE0A

Make the commenting style consistent with networking block comment
style as suggested by checkpatch.

Signed-off-by: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 drivers/net/wireless/ti/wl1251/spi.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
index dfd0877..c7dc6fe 100644
--- a/drivers/net/wireless/ti/wl1251/spi.c
+++ b/drivers/net/wireless/ti/wl1251/spi.c
@@ -93,8 +93,7 @@ static void wl1251_spi_wake(struct wl1251 *wl)
 	memset(&t, 0, sizeof(t));
 	spi_message_init(&m);
 
-	/*
-	 * Set WSPI_INIT_COMMAND
+	/* Set WSPI_INIT_COMMAND
 	 * the data is being send from the MSB to LSB
 	 */
 	cmd[2] = 0xff;
@@ -262,7 +261,8 @@ static int wl1251_spi_probe(struct spi_device *spi)
 	wl->if_ops = &wl1251_spi_ops;
 
 	/* This is the only SPI value that we need to set here, the rest
-	 * comes from the board-peripherals file */
+	 * comes from the board-peripherals file
+	 */
 	spi->bits_per_word = 32;
 
 	ret = spi_setup(spi);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] net: wireless: wl1251: Use module_spi_driver macro
  2013-05-29 10:18 ` Sachin Kamat
  (?)
  (?)
@ 2013-06-06  9:18 ` Sachin Kamat
  2013-06-06 11:46   ` Luciano Coelho
  -1 siblings, 1 reply; 8+ messages in thread
From: Sachin Kamat @ 2013-06-06  9:18 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, sachin.kamat

On 29 May 2013 15:48, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> module_spi_driver() eliminates some boiler plate and makes code
> simpler.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/net/wireless/ti/wl1251/spi.c |   24 +-----------------------
>  1 file changed, 1 insertion(+), 23 deletions(-)
>
> diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
> index 4c67c2f..dfd0877 100644
> --- a/drivers/net/wireless/ti/wl1251/spi.c
> +++ b/drivers/net/wireless/ti/wl1251/spi.c
> @@ -329,29 +329,7 @@ static struct spi_driver wl1251_spi_driver = {
>         .remove         = wl1251_spi_remove,
>  };
>
> -static int __init wl1251_spi_init(void)
> -{
> -       int ret;
> -
> -       ret = spi_register_driver(&wl1251_spi_driver);
> -       if (ret < 0) {
> -               wl1251_error("failed to register spi driver: %d", ret);
> -               goto out;
> -       }
> -
> -out:
> -       return ret;
> -}
> -
> -static void __exit wl1251_spi_exit(void)
> -{
> -       spi_unregister_driver(&wl1251_spi_driver);
> -
> -       wl1251_notice("unloaded");
> -}
> -
> -module_init(wl1251_spi_init);
> -module_exit(wl1251_spi_exit);
> +module_spi_driver(wl1251_spi_driver);
>
>  MODULE_LICENSE("GPL");
>  MODULE_AUTHOR("Kalle Valo <kvalo@adurom.com>");
> --
> 1.7.9.5
>

Gentle ping on this series John.

-- 
With warm regards,
Sachin

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

* Re: [PATCH 1/2] net: wireless: wl1251: Use module_spi_driver macro
  2013-06-06  9:18 ` [PATCH 1/2] net: wireless: wl1251: Use module_spi_driver macro Sachin Kamat
@ 2013-06-06 11:46   ` Luciano Coelho
  2013-06-06 11:51     ` Sachin Kamat
  0 siblings, 1 reply; 8+ messages in thread
From: Luciano Coelho @ 2013-06-06 11:46 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-wireless, linville

Hi Sachin,

On Thu, 2013-06-06 at 14:48 +0530, Sachin Kamat wrote:
> On 29 May 2013 15:48, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> > module_spi_driver() eliminates some boiler plate and makes code
> > simpler.
> >
> > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> > ---
> >  drivers/net/wireless/ti/wl1251/spi.c |   24 +-----------------------
> >  1 file changed, 1 insertion(+), 23 deletions(-)
> >
> > diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
> > index 4c67c2f..dfd0877 100644
> > --- a/drivers/net/wireless/ti/wl1251/spi.c
> > +++ b/drivers/net/wireless/ti/wl1251/spi.c
> > @@ -329,29 +329,7 @@ static struct spi_driver wl1251_spi_driver = {
> >         .remove         = wl1251_spi_remove,
> >  };
> >
> > -static int __init wl1251_spi_init(void)
> > -{
> > -       int ret;
> > -
> > -       ret = spi_register_driver(&wl1251_spi_driver);
> > -       if (ret < 0) {
> > -               wl1251_error("failed to register spi driver: %d", ret);
> > -               goto out;
> > -       }
> > -
> > -out:
> > -       return ret;
> > -}
> > -
> > -static void __exit wl1251_spi_exit(void)
> > -{
> > -       spi_unregister_driver(&wl1251_spi_driver);
> > -
> > -       wl1251_notice("unloaded");
> > -}
> > -
> > -module_init(wl1251_spi_init);
> > -module_exit(wl1251_spi_exit);
> > +module_spi_driver(wl1251_spi_driver);
> >
> >  MODULE_LICENSE("GPL");
> >  MODULE_AUTHOR("Kalle Valo <kvalo@adurom.com>");
> > --
> > 1.7.9.5
> >
> 
> Gentle ping on this series John.

This is in my queue.  Haven't had the time to review and apply them yet.
And these are not urgent changes, so they can wait a little while.

--
Luca.


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

* Re: [PATCH 1/2] net: wireless: wl1251: Use module_spi_driver macro
  2013-06-06 11:46   ` Luciano Coelho
@ 2013-06-06 11:51     ` Sachin Kamat
  0 siblings, 0 replies; 8+ messages in thread
From: Sachin Kamat @ 2013-06-06 11:51 UTC (permalink / raw)
  To: Luciano Coelho; +Cc: linux-wireless, linville

Hi Luciano,

On 6 June 2013 17:16, Luciano Coelho <coelho@ti.com> wrote:
> Hi Sachin,
>
> On Thu, 2013-06-06 at 14:48 +0530, Sachin Kamat wrote:
>> On 29 May 2013 15:48, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>> > module_spi_driver() eliminates some boiler plate and makes code
>> > simpler.
>> >
>> > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> > ---
>> >  drivers/net/wireless/ti/wl1251/spi.c |   24 +-----------------------
>> >  1 file changed, 1 insertion(+), 23 deletions(-)
>> >
>> > diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
>> > index 4c67c2f..dfd0877 100644
>> > --- a/drivers/net/wireless/ti/wl1251/spi.c
>> > +++ b/drivers/net/wireless/ti/wl1251/spi.c
>> > @@ -329,29 +329,7 @@ static struct spi_driver wl1251_spi_driver = {
>> >         .remove         = wl1251_spi_remove,
>> >  };
>> >
>> > -static int __init wl1251_spi_init(void)
>> > -{
>> > -       int ret;
>> > -
>> > -       ret = spi_register_driver(&wl1251_spi_driver);
>> > -       if (ret < 0) {
>> > -               wl1251_error("failed to register spi driver: %d", ret);
>> > -               goto out;
>> > -       }
>> > -
>> > -out:
>> > -       return ret;
>> > -}
>> > -
>> > -static void __exit wl1251_spi_exit(void)
>> > -{
>> > -       spi_unregister_driver(&wl1251_spi_driver);
>> > -
>> > -       wl1251_notice("unloaded");
>> > -}
>> > -
>> > -module_init(wl1251_spi_init);
>> > -module_exit(wl1251_spi_exit);
>> > +module_spi_driver(wl1251_spi_driver);
>> >
>> >  MODULE_LICENSE("GPL");
>> >  MODULE_AUTHOR("Kalle Valo <kvalo@adurom.com>");
>> > --
>> > 1.7.9.5
>> >
>>
>> Gentle ping on this series John.
>
> This is in my queue.  Haven't had the time to review and apply them yet.
> And these are not urgent changes, so they can wait a little while.

Sure. Thanks.


-- 
With warm regards,
Sachin

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

* Re: [PATCH 1/2] net: wireless: wl1251: Use module_spi_driver macro
  2013-05-29 10:18 ` Sachin Kamat
                   ` (2 preceding siblings ...)
  (?)
@ 2013-06-17  9:24 ` Luciano Coelho
  -1 siblings, 0 replies; 8+ messages in thread
From: Luciano Coelho @ 2013-06-17  9:24 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-wireless, netdev, davem, linville

On Wed, 2013-05-29 at 15:48 +0530, Sachin Kamat wrote:
> module_spi_driver() eliminates some boiler plate and makes code
> simpler.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---

Applied both patches in this series.

Thanks!

--
Luca.


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

end of thread, other threads:[~2013-06-17  9:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-29 10:18 [PATCH 1/2] net: wireless: wl1251: Use module_spi_driver macro Sachin Kamat
2013-05-29 10:18 ` Sachin Kamat
2013-05-29 10:18 ` [PATCH 2/2] net: wireless: wl1251: Fix commenting style Sachin Kamat
2013-05-29 10:18   ` Sachin Kamat
2013-06-06  9:18 ` [PATCH 1/2] net: wireless: wl1251: Use module_spi_driver macro Sachin Kamat
2013-06-06 11:46   ` Luciano Coelho
2013-06-06 11:51     ` Sachin Kamat
2013-06-17  9:24 ` Luciano Coelho

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.