netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] cirrus: cs89x0: Use module_platform_driver_probe macro
@ 2013-03-05  4:31 Sachin Kamat
  2013-03-05  4:31 ` [PATCH 2/3] net: at91_ether: " Sachin Kamat
  2013-03-05  4:31 ` [PATCH 3/3] net: macb: " Sachin Kamat
  0 siblings, 2 replies; 5+ messages in thread
From: Sachin Kamat @ 2013-03-05  4:31 UTC (permalink / raw)
  To: netdev; +Cc: davem, sachin.kamat

module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/net/ethernet/cirrus/cs89x0.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ethernet/cirrus/cs89x0.c b/drivers/net/ethernet/cirrus/cs89x0.c
index 1384469..73c1c8c 100644
--- a/drivers/net/ethernet/cirrus/cs89x0.c
+++ b/drivers/net/ethernet/cirrus/cs89x0.c
@@ -1978,18 +1978,6 @@ static struct platform_driver cs89x0_driver = {
 	.remove	= cs89x0_platform_remove,
 };
 
-static int __init cs89x0_init(void)
-{
-	return platform_driver_probe(&cs89x0_driver, cs89x0_platform_probe);
-}
-
-module_init(cs89x0_init);
-
-static void __exit cs89x0_cleanup(void)
-{
-	platform_driver_unregister(&cs89x0_driver);
-}
-
-module_exit(cs89x0_cleanup);
+module_platform_driver_probe(cs89x0_driver, cs89x0_platform_probe);
 
 #endif /* CONFIG_CS89x0_PLATFORM */
-- 
1.7.4.1

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

* [PATCH 2/3] net: at91_ether: Use module_platform_driver_probe macro
  2013-03-05  4:31 [PATCH 1/3] cirrus: cs89x0: Use module_platform_driver_probe macro Sachin Kamat
@ 2013-03-05  4:31 ` Sachin Kamat
  2013-03-05  9:41   ` RE : " Ferre, Nicolas
  2013-03-05  4:31 ` [PATCH 3/3] net: macb: " Sachin Kamat
  1 sibling, 1 reply; 5+ messages in thread
From: Sachin Kamat @ 2013-03-05  4:31 UTC (permalink / raw)
  To: netdev; +Cc: davem, sachin.kamat, Nicolas Ferre

module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 drivers/net/ethernet/cadence/at91_ether.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c
index 3becdb2..1a57e16 100644
--- a/drivers/net/ethernet/cadence/at91_ether.c
+++ b/drivers/net/ethernet/cadence/at91_ether.c
@@ -519,18 +519,7 @@ static struct platform_driver at91ether_driver = {
 	},
 };
 
-static int __init at91ether_init(void)
-{
-	return platform_driver_probe(&at91ether_driver, at91ether_probe);
-}
-
-static void __exit at91ether_exit(void)
-{
-	platform_driver_unregister(&at91ether_driver);
-}
-
-module_init(at91ether_init)
-module_exit(at91ether_exit)
+module_platform_driver_probe(at91ether_driver, at91ether_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("AT91RM9200 EMAC Ethernet driver");
-- 
1.7.4.1

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

* [PATCH 3/3] net: macb: Use module_platform_driver_probe macro
  2013-03-05  4:31 [PATCH 1/3] cirrus: cs89x0: Use module_platform_driver_probe macro Sachin Kamat
  2013-03-05  4:31 ` [PATCH 2/3] net: at91_ether: " Sachin Kamat
@ 2013-03-05  4:31 ` Sachin Kamat
  2013-03-05  9:36   ` RE : " Ferre, Nicolas
  1 sibling, 1 reply; 5+ messages in thread
From: Sachin Kamat @ 2013-03-05  4:31 UTC (permalink / raw)
  To: netdev; +Cc: davem, sachin.kamat, Nicolas Ferre

module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 drivers/net/ethernet/cadence/macb.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index 7903943..3a5d680 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -1737,18 +1737,7 @@ static struct platform_driver macb_driver = {
 	},
 };
 
-static int __init macb_init(void)
-{
-	return platform_driver_probe(&macb_driver, macb_probe);
-}
-
-static void __exit macb_exit(void)
-{
-	platform_driver_unregister(&macb_driver);
-}
-
-module_init(macb_init);
-module_exit(macb_exit);
+module_platform_driver_probe(macb_driver, macb_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Cadence MACB/GEM Ethernet driver");
-- 
1.7.4.1

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

* RE : [PATCH 3/3] net: macb: Use module_platform_driver_probe macro
  2013-03-05  4:31 ` [PATCH 3/3] net: macb: " Sachin Kamat
@ 2013-03-05  9:36   ` Ferre, Nicolas
  0 siblings, 0 replies; 5+ messages in thread
From: Ferre, Nicolas @ 2013-03-05  9:36 UTC (permalink / raw)
  To: Sachin Kamat, netdev@vger.kernel.org; +Cc: davem@davemloft.net

> module_platform_driver_probe() eliminates the boilerplate and simplifies
> the code.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

> ---
>  drivers/net/ethernet/cadence/macb.c |   13 +------------
>  1 files changed, 1 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index 7903943..3a5d680 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -1737,18 +1737,7 @@ static struct platform_driver macb_driver = {
>         },
>  };
> 
> -static int __init macb_init(void)
> -{
> -       return platform_driver_probe(&macb_driver, macb_probe);
> -}
> -
> -static void __exit macb_exit(void)
> -{
> -       platform_driver_unregister(&macb_driver);
> -}
> -
> -module_init(macb_init);
> -module_exit(macb_exit);
> +module_platform_driver_probe(macb_driver, macb_probe);
> 
>  MODULE_LICENSE("GPL");
>  MODULE_DESCRIPTION("Cadence MACB/GEM Ethernet driver");
> --
> 1.7.4.1
> 

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

* RE : [PATCH 2/3] net: at91_ether: Use module_platform_driver_probe macro
  2013-03-05  4:31 ` [PATCH 2/3] net: at91_ether: " Sachin Kamat
@ 2013-03-05  9:41   ` Ferre, Nicolas
  0 siblings, 0 replies; 5+ messages in thread
From: Ferre, Nicolas @ 2013-03-05  9:41 UTC (permalink / raw)
  To: Sachin Kamat, netdev@vger.kernel.org; +Cc: davem@davemloft.net

> module_platform_driver_probe() eliminates the boilerplate and simplifies
> the code.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

> ---
>  drivers/net/ethernet/cadence/at91_ether.c |   13 +------------
>  1 files changed, 1 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c
> index 3becdb2..1a57e16 100644
> --- a/drivers/net/ethernet/cadence/at91_ether.c
> +++ b/drivers/net/ethernet/cadence/at91_ether.c
> @@ -519,18 +519,7 @@ static struct platform_driver at91ether_driver = {
>         },
>  };
> 
> -static int __init at91ether_init(void)
> -{
> -       return platform_driver_probe(&at91ether_driver, at91ether_probe);
> -}
> -
> -static void __exit at91ether_exit(void)
> -{
> -       platform_driver_unregister(&at91ether_driver);
> -}
> -
> -module_init(at91ether_init)
> -module_exit(at91ether_exit)
> +module_platform_driver_probe(at91ether_driver, at91ether_probe);
> 
>  MODULE_LICENSE("GPL");
>  MODULE_DESCRIPTION("AT91RM9200 EMAC Ethernet driver");
> --
> 1.7.4.1
> 

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

end of thread, other threads:[~2013-03-05  9:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-05  4:31 [PATCH 1/3] cirrus: cs89x0: Use module_platform_driver_probe macro Sachin Kamat
2013-03-05  4:31 ` [PATCH 2/3] net: at91_ether: " Sachin Kamat
2013-03-05  9:41   ` RE : " Ferre, Nicolas
2013-03-05  4:31 ` [PATCH 3/3] net: macb: " Sachin Kamat
2013-03-05  9:36   ` RE : " Ferre, Nicolas

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