Subject: Re: [PATCH 3.6.0- 2/3] net/mdio-octeon: use module_platform_driver macro

From: David Daney <[email-masked]>
Date: Wed, 10 Oct 2012 11:46:14 -0700

On 10/10/2012 11:29 AM, Srinivas KANDAGATLA wrote:
> From: Srinivas Kandagatla <[email-masked]>
>
> This patch removes some code duplication by using
> module_platform_driver.
>
> Signed-off-by: Srinivas Kandagatla <[email-masked]>

Acked-by: David Daney <[email-masked]>

I have the same thing locally, but you beat me to sending it in.

> ---
>   drivers/net/phy/mdio-octeon.c |   14 +-------------
>   1 files changed, 1 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c
> index d4015aa..84f7c47 100644
> --- a/drivers/net/phy/mdio-octeon.c
> +++ b/drivers/net/phy/mdio-octeon.c
> @@ -196,19 +196,7 @@ void octeon_mdiobus_force_mod_depencency(void)
>   	/* Let ethernet drivers force us to be loaded.  */
>   }
>   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);
>