Patchwork [net-next,RESEND,1/2] net: phy: export genphy_config_init()

login
register
mail settings
Submitter Daniel Mack
Date April 16, 2014, 3:19 p.m.
Message ID <1397661553-22117-1-git-send-email-zonque@gmail.com>
Download mbox | patch
Permalink /patch/339622/
State Accepted
Delegated to: David Miller
Headers show

Comments

Daniel Mack - April 16, 2014, 3:19 p.m.
This enables other drivers to call this generic implementation, and then
only do specific details on top of it.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
Resending this after 3.15-rc1 has been released, assuming that the
net-next tree is now open again.

 drivers/net/phy/phy_device.c | 3 ++-
 include/linux/phy.h          | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
Florian Fainelli - April 16, 2014, 7:14 p.m.
2014-04-16 8:19 GMT-07:00 Daniel Mack <zonque@gmail.com>:
> This enables other drivers to call this generic implementation, and then
> only do specific details on top of it.
>
> Signed-off-by: Daniel Mack <zonque@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

> ---
> Resending this after 3.15-rc1 has been released, assuming that the
> net-next tree is now open again.
>
>  drivers/net/phy/phy_device.c | 3 ++-
>  include/linux/phy.h          | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> index 2f6989b..84485ea 100644
> --- a/drivers/net/phy/phy_device.c
> +++ b/drivers/net/phy/phy_device.c
> @@ -1029,7 +1029,7 @@ static int gen10g_read_status(struct phy_device *phydev)
>         return 0;
>  }
>
> -static int genphy_config_init(struct phy_device *phydev)
> +int genphy_config_init(struct phy_device *phydev)
>  {
>         int val;
>         u32 features;
> @@ -1074,6 +1074,7 @@ static int genphy_config_init(struct phy_device *phydev)
>
>         return 0;
>  }
> +EXPORT_SYMBOL(genphy_config_init);
>
>  static int gen10g_config_init(struct phy_device *phydev)
>  {
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 565188c..dcf7f13 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -609,6 +609,7 @@ static inline int phy_read_status(struct phy_device *phydev)
>         return phydev->drv->read_status(phydev);
>  }
>
> +int genphy_config_init(struct phy_device *phydev);
>  int genphy_setup_forced(struct phy_device *phydev);
>  int genphy_restart_aneg(struct phy_device *phydev);
>  int genphy_config_aneg(struct phy_device *phydev);
> --
> 1.9.0
>
David Miller - April 20, 2014, 10:19 p.m.
From: Daniel Mack <zonque@gmail.com>
Date: Wed, 16 Apr 2014 17:19:12 +0200

> This enables other drivers to call this generic implementation, and then
> only do specific details on top of it.
> 
> Signed-off-by: Daniel Mack <zonque@gmail.com>

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

Patch

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 2f6989b..84485ea 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1029,7 +1029,7 @@  static int gen10g_read_status(struct phy_device *phydev)
 	return 0;
 }
 
-static int genphy_config_init(struct phy_device *phydev)
+int genphy_config_init(struct phy_device *phydev)
 {
 	int val;
 	u32 features;
@@ -1074,6 +1074,7 @@  static int genphy_config_init(struct phy_device *phydev)
 
 	return 0;
 }
+EXPORT_SYMBOL(genphy_config_init);
 
 static int gen10g_config_init(struct phy_device *phydev)
 {
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 565188c..dcf7f13 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -609,6 +609,7 @@  static inline int phy_read_status(struct phy_device *phydev)
 	return phydev->drv->read_status(phydev);
 }
 
+int genphy_config_init(struct phy_device *phydev);
 int genphy_setup_forced(struct phy_device *phydev);
 int genphy_restart_aneg(struct phy_device *phydev);
 int genphy_config_aneg(struct phy_device *phydev);