All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] net: ks8695net: Use module_platform_driver()
@ 2013-03-20 11:41 Sachin Kamat
  2013-03-20 11:41 ` [PATCH 2/5] net: s6gmac: " Sachin Kamat
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Sachin Kamat @ 2013-03-20 11:41 UTC (permalink / raw)
  To: netdev; +Cc: davem, sachin.kamat

module_platform_driver macro removes some boilerplate and
simplifies the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/net/ethernet/micrel/ks8695net.c |   20 +-------------------
 1 files changed, 1 insertions(+), 19 deletions(-)

diff --git a/drivers/net/ethernet/micrel/ks8695net.c b/drivers/net/ethernet/micrel/ks8695net.c
index 07a6ebc..b6c60fd 100644
--- a/drivers/net/ethernet/micrel/ks8695net.c
+++ b/drivers/net/ethernet/micrel/ks8695net.c
@@ -1622,25 +1622,7 @@ static struct platform_driver ks8695_driver = {
 	.resume		= ks8695_drv_resume,
 };
 
-/* Module interface */
-
-static int __init
-ks8695_init(void)
-{
-	printk(KERN_INFO "%s Ethernet driver, V%s\n",
-	       MODULENAME, MODULEVERSION);
-
-	return platform_driver_register(&ks8695_driver);
-}
-
-static void __exit
-ks8695_cleanup(void)
-{
-	platform_driver_unregister(&ks8695_driver);
-}
-
-module_init(ks8695_init);
-module_exit(ks8695_cleanup);
+module_platform_driver(ks8695_driver);
 
 MODULE_AUTHOR("Simtec Electronics");
 MODULE_DESCRIPTION("Micrel KS8695 (Centaur) Ethernet driver");
-- 
1.7.4.1

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

* [PATCH 2/5] net: s6gmac: Use module_platform_driver()
  2013-03-20 11:41 [PATCH 1/5] net: ks8695net: Use module_platform_driver() Sachin Kamat
@ 2013-03-20 11:41 ` Sachin Kamat
  2013-03-20 17:26   ` David Miller
  2013-03-20 11:41 ` [PATCH 3/5] net: au1k_ir: " Sachin Kamat
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Sachin Kamat @ 2013-03-20 11:41 UTC (permalink / raw)
  To: netdev; +Cc: davem, sachin.kamat

module_platform_driver macro removes some boilerplate and
simplifies the code.

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

diff --git a/drivers/net/ethernet/s6gmac.c b/drivers/net/ethernet/s6gmac.c
index 21683e2..cd5f4e2 100644
--- a/drivers/net/ethernet/s6gmac.c
+++ b/drivers/net/ethernet/s6gmac.c
@@ -1053,20 +1053,7 @@ static struct platform_driver s6gmac_driver = {
 	},
 };
 
-static int __init s6gmac_init(void)
-{
-	printk(KERN_INFO DRV_PRMT "S6 GMAC ethernet driver\n");
-	return platform_driver_register(&s6gmac_driver);
-}
-
-
-static void __exit s6gmac_exit(void)
-{
-	platform_driver_unregister(&s6gmac_driver);
-}
-
-module_init(s6gmac_init);
-module_exit(s6gmac_exit);
+module_platform_driver(s6gmac_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("S6105 on chip Ethernet driver");
-- 
1.7.4.1

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

* [PATCH 3/5] net: au1k_ir: Use module_platform_driver()
  2013-03-20 11:41 [PATCH 1/5] net: ks8695net: Use module_platform_driver() Sachin Kamat
  2013-03-20 11:41 ` [PATCH 2/5] net: s6gmac: " Sachin Kamat
@ 2013-03-20 11:41 ` Sachin Kamat
  2013-03-20 17:26   ` David Miller
  2013-03-20 11:41 ` [PATCH 4/5] net: mdio-gpio: " Sachin Kamat
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Sachin Kamat @ 2013-03-20 11:41 UTC (permalink / raw)
  To: netdev; +Cc: davem, sachin.kamat, Samuel Ortiz

module_platform_driver macro removes some boilerplate and
simplifies the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Samuel Ortiz <samuel@sortiz.org>
---
 drivers/net/irda/au1k_ir.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c
index 56f1e6d..7a1f684 100644
--- a/drivers/net/irda/au1k_ir.c
+++ b/drivers/net/irda/au1k_ir.c
@@ -953,18 +953,7 @@ static struct platform_driver au1k_irda_driver = {
 	.remove		= au1k_irda_remove,
 };
 
-static int __init au1k_irda_load(void)
-{
-	return platform_driver_register(&au1k_irda_driver);
-}
-
-static void __exit au1k_irda_unload(void)
-{
-	return platform_driver_unregister(&au1k_irda_driver);
-}
+module_platform_driver(au1k_irda_driver);
 
 MODULE_AUTHOR("Pete Popov <ppopov@mvista.com>");
 MODULE_DESCRIPTION("Au1000 IrDA Device Driver");
-
-module_init(au1k_irda_load);
-module_exit(au1k_irda_unload);
-- 
1.7.4.1

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

* [PATCH 4/5] net: mdio-gpio: Use module_platform_driver()
  2013-03-20 11:41 [PATCH 1/5] net: ks8695net: Use module_platform_driver() Sachin Kamat
  2013-03-20 11:41 ` [PATCH 2/5] net: s6gmac: " Sachin Kamat
  2013-03-20 11:41 ` [PATCH 3/5] net: au1k_ir: " Sachin Kamat
@ 2013-03-20 11:41 ` Sachin Kamat
  2013-03-20 17:26   ` David Miller
  2013-03-20 11:41 ` [PATCH 5/5] net: mdio-octeon: " Sachin Kamat
  2013-03-20 17:25 ` [PATCH 1/5] net: ks8695net: " David Miller
  4 siblings, 1 reply; 11+ messages in thread
From: Sachin Kamat @ 2013-03-20 11:41 UTC (permalink / raw)
  To: netdev; +Cc: davem, sachin.kamat

module_platform_driver macro removes some boilerplate and
simplifies the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/net/phy/mdio-gpio.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
index 2727498..a47f923 100644
--- a/drivers/net/phy/mdio-gpio.c
+++ b/drivers/net/phy/mdio-gpio.c
@@ -235,17 +235,7 @@ static struct platform_driver mdio_gpio_driver = {
 	},
 };
 
-static int __init mdio_gpio_init(void)
-{
-	return platform_driver_register(&mdio_gpio_driver);
-}
-module_init(mdio_gpio_init);
-
-static void __exit mdio_gpio_exit(void)
-{
-	platform_driver_unregister(&mdio_gpio_driver);
-}
-module_exit(mdio_gpio_exit);
+module_platform_driver(mdio_gpio_driver);
 
 MODULE_ALIAS("platform:mdio-gpio");
 MODULE_AUTHOR("Laurent Pinchart, Paulius Zaleckas");
-- 
1.7.4.1

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

* [PATCH 5/5] net: mdio-octeon: Use module_platform_driver()
  2013-03-20 11:41 [PATCH 1/5] net: ks8695net: Use module_platform_driver() Sachin Kamat
                   ` (2 preceding siblings ...)
  2013-03-20 11:41 ` [PATCH 4/5] net: mdio-gpio: " Sachin Kamat
@ 2013-03-20 11:41 ` Sachin Kamat
  2013-03-20 16:12   ` David Daney
  2013-03-20 17:26   ` David Miller
  2013-03-20 17:25 ` [PATCH 1/5] net: ks8695net: " David Miller
  4 siblings, 2 replies; 11+ messages in thread
From: Sachin Kamat @ 2013-03-20 11:41 UTC (permalink / raw)
  To: netdev; +Cc: davem, sachin.kamat, David Daney

module_platform_driver macro removes some boilerplate and
simplifies the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: David Daney <ddaney@caviumnetworks.com>
---
 drivers/net/phy/mdio-octeon.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c
index 09297fe..c2c878d 100644
--- a/drivers/net/phy/mdio-octeon.c
+++ b/drivers/net/phy/mdio-octeon.c
@@ -197,18 +197,7 @@ void octeon_mdiobus_force_mod_depencency(void)
 }
 EXPORT_SYMBOL(octeon_mdiobus_force_mod_depencency);
 
-static int __init octeon_mdiobus_mod_init(void)
-{
-	return platform_driver_register(&octeon_mdiobus_driver);
-}
-
-static void __exit octeon_mdiobus_mod_exit(void)
-{
-	platform_driver_unregister(&octeon_mdiobus_driver);
-}
-
-module_init(octeon_mdiobus_mod_init);
-module_exit(octeon_mdiobus_mod_exit);
+module_platform_driver(octeon_mdiobus_driver);
 
 MODULE_DESCRIPTION(DRV_DESCRIPTION);
 MODULE_VERSION(DRV_VERSION);
-- 
1.7.4.1

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

* Re: [PATCH 5/5] net: mdio-octeon: Use module_platform_driver()
  2013-03-20 11:41 ` [PATCH 5/5] net: mdio-octeon: " Sachin Kamat
@ 2013-03-20 16:12   ` David Daney
  2013-03-20 17:26   ` David Miller
  1 sibling, 0 replies; 11+ messages in thread
From: David Daney @ 2013-03-20 16:12 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: netdev, davem, David Daney

On 03/20/2013 04:41 AM, Sachin Kamat wrote:
> module_platform_driver macro removes some boilerplate and
> simplifies the code.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: David Daney <ddaney@caviumnetworks.com>

I was going to send the equivalent patch.

Acked-by: David Daney <ddaney@caviumnetworks.com>


> ---
>   drivers/net/phy/mdio-octeon.c |   13 +------------
>   1 files changed, 1 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c
> index 09297fe..c2c878d 100644
> --- a/drivers/net/phy/mdio-octeon.c
> +++ b/drivers/net/phy/mdio-octeon.c
> @@ -197,18 +197,7 @@ void octeon_mdiobus_force_mod_depencency(void)
>   }
>   EXPORT_SYMBOL(octeon_mdiobus_force_mod_depencency);
>
> -static int __init octeon_mdiobus_mod_init(void)
> -{
> -	return platform_driver_register(&octeon_mdiobus_driver);
> -}
> -
> -static void __exit octeon_mdiobus_mod_exit(void)
> -{
> -	platform_driver_unregister(&octeon_mdiobus_driver);
> -}
> -
> -module_init(octeon_mdiobus_mod_init);
> -module_exit(octeon_mdiobus_mod_exit);
> +module_platform_driver(octeon_mdiobus_driver);
>
>   MODULE_DESCRIPTION(DRV_DESCRIPTION);
>   MODULE_VERSION(DRV_VERSION);
>

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

* Re: [PATCH 1/5] net: ks8695net: Use module_platform_driver()
  2013-03-20 11:41 [PATCH 1/5] net: ks8695net: Use module_platform_driver() Sachin Kamat
                   ` (3 preceding siblings ...)
  2013-03-20 11:41 ` [PATCH 5/5] net: mdio-octeon: " Sachin Kamat
@ 2013-03-20 17:25 ` David Miller
  4 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2013-03-20 17:25 UTC (permalink / raw)
  To: sachin.kamat; +Cc: netdev

From: Sachin Kamat <sachin.kamat@linaro.org>
Date: Wed, 20 Mar 2013 17:11:28 +0530

> module_platform_driver macro removes some boilerplate and
> simplifies the code.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Applied.

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

* Re: [PATCH 2/5] net: s6gmac: Use module_platform_driver()
  2013-03-20 11:41 ` [PATCH 2/5] net: s6gmac: " Sachin Kamat
@ 2013-03-20 17:26   ` David Miller
  0 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2013-03-20 17:26 UTC (permalink / raw)
  To: sachin.kamat; +Cc: netdev

From: Sachin Kamat <sachin.kamat@linaro.org>
Date: Wed, 20 Mar 2013 17:11:29 +0530

> module_platform_driver macro removes some boilerplate and
> simplifies the code.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Applied.

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

* Re: [PATCH 3/5] net: au1k_ir: Use module_platform_driver()
  2013-03-20 11:41 ` [PATCH 3/5] net: au1k_ir: " Sachin Kamat
@ 2013-03-20 17:26   ` David Miller
  0 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2013-03-20 17:26 UTC (permalink / raw)
  To: sachin.kamat; +Cc: netdev, samuel

From: Sachin Kamat <sachin.kamat@linaro.org>
Date: Wed, 20 Mar 2013 17:11:30 +0530

> module_platform_driver macro removes some boilerplate and
> simplifies the code.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Samuel Ortiz <samuel@sortiz.org>

Applied.

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

* Re: [PATCH 4/5] net: mdio-gpio: Use module_platform_driver()
  2013-03-20 11:41 ` [PATCH 4/5] net: mdio-gpio: " Sachin Kamat
@ 2013-03-20 17:26   ` David Miller
  0 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2013-03-20 17:26 UTC (permalink / raw)
  To: sachin.kamat; +Cc: netdev

From: Sachin Kamat <sachin.kamat@linaro.org>
Date: Wed, 20 Mar 2013 17:11:31 +0530

> module_platform_driver macro removes some boilerplate and
> simplifies the code.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Applied.

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

* Re: [PATCH 5/5] net: mdio-octeon: Use module_platform_driver()
  2013-03-20 11:41 ` [PATCH 5/5] net: mdio-octeon: " Sachin Kamat
  2013-03-20 16:12   ` David Daney
@ 2013-03-20 17:26   ` David Miller
  1 sibling, 0 replies; 11+ messages in thread
From: David Miller @ 2013-03-20 17:26 UTC (permalink / raw)
  To: sachin.kamat; +Cc: netdev, ddaney

From: Sachin Kamat <sachin.kamat@linaro.org>
Date: Wed, 20 Mar 2013 17:11:32 +0530

> module_platform_driver macro removes some boilerplate and
> simplifies the code.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Applied.

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

end of thread, other threads:[~2013-03-20 17:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-20 11:41 [PATCH 1/5] net: ks8695net: Use module_platform_driver() Sachin Kamat
2013-03-20 11:41 ` [PATCH 2/5] net: s6gmac: " Sachin Kamat
2013-03-20 17:26   ` David Miller
2013-03-20 11:41 ` [PATCH 3/5] net: au1k_ir: " Sachin Kamat
2013-03-20 17:26   ` David Miller
2013-03-20 11:41 ` [PATCH 4/5] net: mdio-gpio: " Sachin Kamat
2013-03-20 17:26   ` David Miller
2013-03-20 11:41 ` [PATCH 5/5] net: mdio-octeon: " Sachin Kamat
2013-03-20 16:12   ` David Daney
2013-03-20 17:26   ` David Miller
2013-03-20 17:25 ` [PATCH 1/5] net: ks8695net: " David Miller

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.