tools: mkimage: provide dtc path during build
[openwrt/openwrt.git] / target / linux / mvebu / patches-4.4 / 128-phy-export-phy_speed_to_str-for-phylink.patch
1 From 5c77cc2ffd5deb4762d9551409472f2441297fe7 Mon Sep 17 00:00:00 2001
2 From: Russell King <rmk+kernel@arm.linux.org.uk>
3 Date: Sun, 18 Oct 2015 19:51:10 +0100
4 Subject: [PATCH 716/744] phy: export phy_speed_to_str() for phylink
5
6 phylink would like to reuse phy_speed_to_str() to convert the speed
7 to a string. Add a prototype and export this helper function.
8
9 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
10 Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 ---
12 drivers/net/phy/phy.c | 3 ++-
13 include/linux/phy.h | 1 +
14 2 files changed, 3 insertions(+), 1 deletion(-)
15
16 --- a/drivers/net/phy/phy.c
17 +++ b/drivers/net/phy/phy.c
18 @@ -38,7 +38,7 @@
19
20 #include <asm/irq.h>
21
22 -static const char *phy_speed_to_str(int speed)
23 +const char *phy_speed_to_str(int speed)
24 {
25 switch (speed) {
26 case SPEED_10:
27 @@ -57,6 +57,7 @@ static const char *phy_speed_to_str(int
28 return "Unsupported (update phy.c)";
29 }
30 }
31 +EXPORT_SYMBOL_GPL(phy_speed_to_str);
32
33 #define PHY_STATE_STR(_state) \
34 case PHY_##_state: \
35 --- a/include/linux/phy.h
36 +++ b/include/linux/phy.h
37 @@ -823,6 +823,7 @@ int phy_ethtool_gset(struct phy_device *
38 int phy_ethtool_ioctl(struct phy_device *phydev, void *useraddr);
39 int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);
40 int phy_start_interrupts(struct phy_device *phydev);
41 +const char *phy_speed_to_str(int speed);
42 void phy_print_status(struct phy_device *phydev);
43 void phy_device_free(struct phy_device *phydev);
44 int phy_set_max_speed(struct phy_device *phydev, u32 max_speed);